Procházet zdrojové kódy

set rawSQL when rendering query builder query

Sven Klemm před 7 roky
rodič
revize
bf4a30d30f

+ 1 - 0
public/app/plugins/datasource/postgres/postgres_query.ts

@@ -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);
     }
     }

+ 0 - 5
public/app/plugins/datasource/postgres/query_ctrl.ts

@@ -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;
   }
   }