mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 23:14:10 +08:00
dont expand variables in rawSql
This commit is contained in:
@ -77,9 +77,11 @@ export default class PostgresQuery {
|
|||||||
|
|
||||||
render(interpolate?) {
|
render(interpolate?) {
|
||||||
let target = this.target;
|
let target = this.target;
|
||||||
let query;
|
|
||||||
|
|
||||||
if (target.rawQuery) {
|
if (!target.rawQuery) {
|
||||||
|
target.rawSql = this.buildQuery();
|
||||||
|
}
|
||||||
|
|
||||||
if (interpolate) {
|
if (interpolate) {
|
||||||
return this.templateSrv.replace(target.rawSql, this.scopedVars, this.interpolateQueryStr);
|
return this.templateSrv.replace(target.rawSql, this.scopedVars, this.interpolateQueryStr);
|
||||||
} else {
|
} else {
|
||||||
@ -87,14 +89,6 @@ export default class PostgresQuery {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
query = this.buildQuery();
|
|
||||||
if (interpolate) {
|
|
||||||
query = this.templateSrv.replace(query, this.scopedVars, this.interpolateQueryStr);
|
|
||||||
}
|
|
||||||
this.target.rawSql = query;
|
|
||||||
return query;
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTimeColumn() {
|
buildTimeColumn() {
|
||||||
let timeGroup = this.hasGroupByTime();
|
let timeGroup = this.hasGroupByTime();
|
||||||
let query;
|
let query;
|
||||||
|
Reference in New Issue
Block a user