InfluxDB: Fix Interpolation when querying variables (#65875)

Interpolate variables with InfluxQueryModel
pull/65827/head^2
ismail simsek 2 years ago committed by GitHub
parent d4bd024951
commit 4e71c91cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      public/app/plugins/datasource/influxdb/datasource.ts

@ -539,7 +539,15 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery,
});
}
const interpolated = this.templateSrv.replace(query, undefined, 'regex');
const interpolated = new InfluxQueryModel(
{
refId: 'metricFindQuery',
query,
rawQuery: true,
},
this.templateSrv,
options.scopedVars
).render(true);
return lastValueFrom(this._seriesQuery(interpolated, options)).then((resp) => {
return this.responseParser.parse(query, resp);

Loading…
Cancel
Save