mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(influxdb): fixed issue with using multi value template vars in influxdb measurement clause, fixes #4797
This commit is contained in:
parent
4d802df040
commit
6bc898b215
@ -162,13 +162,13 @@ export default class InfluxQuery {
|
||||
return str + '"' + tag.key + '" ' + operator + ' ' + value;
|
||||
}
|
||||
|
||||
getMeasurementAndPolicy() {
|
||||
getMeasurementAndPolicy(interpolate) {
|
||||
var policy = this.target.policy;
|
||||
var measurement = this.target.measurement;
|
||||
|
||||
if (!measurement.match('^/.*/')) {
|
||||
measurement = '"' + measurement+ '"';
|
||||
} else {
|
||||
} else if (interpolate) {
|
||||
measurement = this.templateSrv.replace(measurement, this.scopedVars, 'regex');
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ export default class InfluxQuery {
|
||||
query += selectText;
|
||||
}
|
||||
|
||||
query += ' FROM ' + this.getMeasurementAndPolicy() + ' WHERE ';
|
||||
query += ' FROM ' + this.getMeasurementAndPolicy(interpolate) + ' WHERE ';
|
||||
var conditions = _.map(target.tags, (tag, index) => {
|
||||
return this.renderTagCondition(tag, index, interpolate);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user