Skip to content

Commit 6bc898b

Browse files
committed
fix(influxdb): fixed issue with using multi value template vars in influxdb measurement clause, fixes grafana#4797
1 parent 4d802df commit 6bc898b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

public/app/plugins/datasource/influxdb/influx_query.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ export default class InfluxQuery {
162162
return str + '"' + tag.key + '" ' + operator + ' ' + value;
163163
}
164164

165-
getMeasurementAndPolicy() {
165+
getMeasurementAndPolicy(interpolate) {
166166
var policy = this.target.policy;
167167
var measurement = this.target.measurement;
168168

169169
if (!measurement.match('^/.*/')) {
170170
measurement = '"' + measurement+ '"';
171-
} else {
171+
} else if (interpolate) {
172172
measurement = this.templateSrv.replace(measurement, this.scopedVars, 'regex');
173173
}
174174

@@ -212,7 +212,7 @@ export default class InfluxQuery {
212212
query += selectText;
213213
}
214214

215-
query += ' FROM ' + this.getMeasurementAndPolicy() + ' WHERE ';
215+
query += ' FROM ' + this.getMeasurementAndPolicy(interpolate) + ' WHERE ';
216216
var conditions = _.map(target.tags, (tag, index) => {
217217
return this.renderTagCondition(tag, index, interpolate);
218218
});

0 commit comments

Comments
 (0)