mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: InfluxDB Query Editor and selecting template variable in where clause caused issue, fixes #10402, fixes #10663
This commit is contained in:
@@ -89,7 +89,7 @@ function (angular, _, coreModule) {
|
|||||||
if (addTemplateVars) {
|
if (addTemplateVars) {
|
||||||
_.each(templateSrv.variables, function(variable) {
|
_.each(templateSrv.variables, function(variable) {
|
||||||
if (variableTypeFilter === void 0 || variableTypeFilter === variable.type) {
|
if (variableTypeFilter === void 0 || variableTypeFilter === variable.type) {
|
||||||
segments.unshift(self.newSegment({ type: 'template', value: '$' + variable.name, expandable: true }));
|
segments.unshift(self.newSegment({ type: 'value', value: '$' + variable.name, expandable: true }));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ export class InfluxQueryCtrl extends QueryCtrl {
|
|||||||
for (let variable of this.templateSrv.variables) {
|
for (let variable of this.templateSrv.variables) {
|
||||||
segments.unshift(
|
segments.unshift(
|
||||||
this.uiSegmentSrv.newSegment({
|
this.uiSegmentSrv.newSegment({
|
||||||
type: 'template',
|
type: 'value',
|
||||||
value: '/^$' + variable.name + '$/',
|
value: '/^$' + variable.name + '$/',
|
||||||
expandable: true,
|
expandable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user