mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00
set rawSQL when rendering query builder query
This commit is contained in:
@ -247,6 +247,7 @@ export default class PostgresQuery {
|
|||||||
|
|
||||||
query += ' ORDER BY 1';
|
query += ' ORDER BY 1';
|
||||||
|
|
||||||
|
this.target.rawSql = query;
|
||||||
if (interpolate) {
|
if (interpolate) {
|
||||||
query = this.templateSrv.replace(query, this.scopedVars, this.interpolateQueryStr);
|
query = this.templateSrv.replace(query, this.scopedVars, this.interpolateQueryStr);
|
||||||
}
|
}
|
||||||
|
@ -117,11 +117,6 @@ export class PostgresQueryCtrl extends QueryCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggleEditorMode() {
|
toggleEditorMode() {
|
||||||
try {
|
|
||||||
// this.target.query = this.queryModel.render(false);
|
|
||||||
} catch (err) {
|
|
||||||
console.log('query render error');
|
|
||||||
}
|
|
||||||
this.target.rawQuery = !this.target.rawQuery;
|
this.target.rawQuery = !this.target.rawQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user