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:
Marcus Andersson
2022-02-15 08:53:42 +01:00
committed by GitHub
parent 21beb88a4f
commit 9a12b3ea00
18 changed files with 55 additions and 31 deletions

View File

@ -213,6 +213,6 @@ export class PostgresDatasource extends DataSourceWithBackend<PostgresQuery, Pos
rawSql = rawSql.replace('$__', '');
return this.templateSrv.variableExists(rawSql);
return this.templateSrv.containsTemplate(rawSql);
}
}