mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TemplateSrv: exposing a function to detect if a target contains a template (#45214)
* exposing a function to check if a target contains variables. * fixed tests. * renamed function * updated betterer result.
This commit is contained in:
@@ -373,7 +373,7 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery,
|
||||
// for influxql-mode we use InfluxQueryModel to create the text-representation
|
||||
const queryText = this.isFlux ? target.query : buildRawQuery(target);
|
||||
|
||||
return this.templateSrv.variableExists(queryText);
|
||||
return this.templateSrv.containsTemplate(queryText);
|
||||
}
|
||||
|
||||
interpolateVariablesInQueries(queries: InfluxQuery[], scopedVars: ScopedVars): InfluxQuery[] {
|
||||
|
||||
Reference in New Issue
Block a user