mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dont expand variables in rawSql
This commit is contained in:
parent
2fcb09b23d
commit
070b556fd3
@ -77,22 +77,16 @@ export default class PostgresQuery {
|
||||
|
||||
render(interpolate?) {
|
||||
let target = this.target;
|
||||
let query;
|
||||
|
||||
if (target.rawQuery) {
|
||||
if (interpolate) {
|
||||
return this.templateSrv.replace(target.rawSql, this.scopedVars, this.interpolateQueryStr);
|
||||
} else {
|
||||
return target.rawSql;
|
||||
}
|
||||
if (!target.rawQuery) {
|
||||
target.rawSql = this.buildQuery();
|
||||
}
|
||||
|
||||
query = this.buildQuery();
|
||||
if (interpolate) {
|
||||
query = this.templateSrv.replace(query, this.scopedVars, this.interpolateQueryStr);
|
||||
return this.templateSrv.replace(target.rawSql, this.scopedVars, this.interpolateQueryStr);
|
||||
} else {
|
||||
return target.rawSql;
|
||||
}
|
||||
this.target.rawSql = query;
|
||||
return query;
|
||||
}
|
||||
|
||||
buildTimeColumn() {
|
||||
|
Loading…
Reference in New Issue
Block a user