From b1cf4cf01c291ffb4ed8d19eec54ba844714afb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 29 Jan 2018 17:04:11 +0100 Subject: [PATCH] fix: InfluxDB Query Editor and selecting template variable in where clause caused issue, fixes #10402, fixes #10663 --- public/app/core/services/segment_srv.js | 2 +- public/app/plugins/datasource/influxdb/query_ctrl.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/core/services/segment_srv.js b/public/app/core/services/segment_srv.js index 6c126da1acd..71d0cbfe7a9 100644 --- a/public/app/core/services/segment_srv.js +++ b/public/app/core/services/segment_srv.js @@ -89,7 +89,7 @@ function (angular, _, coreModule) { if (addTemplateVars) { _.each(templateSrv.variables, function(variable) { 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 })); } }); } diff --git a/public/app/plugins/datasource/influxdb/query_ctrl.ts b/public/app/plugins/datasource/influxdb/query_ctrl.ts index c67b65334af..ce669c9f458 100644 --- a/public/app/plugins/datasource/influxdb/query_ctrl.ts +++ b/public/app/plugins/datasource/influxdb/query_ctrl.ts @@ -255,7 +255,7 @@ export class InfluxQueryCtrl extends QueryCtrl { for (let variable of this.templateSrv.variables) { segments.unshift( this.uiSegmentSrv.newSegment({ - type: 'template', + type: 'value', value: '/^$' + variable.name + '$/', expandable: true, })