[v9.5.x] InfluxDB: Fix Interpolation when querying variables (#66392)
InfluxDB: Fix Interpolation when querying variables (#65875)
Interpolate variables with InfluxQueryModel
(cherry picked from commit 4e71c91cfd)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
This commit is contained in:
co-authored by
ismail simsek
parent
1ad3ee4255
commit
348ced74b4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user