Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit 3bfd79e

Browse files
committed
Fixes #44
1 parent 0ffac21 commit 3bfd79e

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

dist/module.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33996,8 +33996,6 @@ function () {
3399633996
};
3399733997

3399833998
BigQueryQuery.prototype.expend_macros = function (options) {
33999-
console.log(this.target.rawSql);
34000-
3400133999
if (this.target.rawSql) {
3400234000
var q = this.target.rawSql;
3400334001
q = this.replaceTimeFilters(q, options);
@@ -34306,10 +34304,12 @@ function () {
3430634304
}
3430734305

3430834306
allQueryPromise = _lodash2.default.map(queries, function (query) {
34307+
var tmpQ = _this.queryModel.target.rawSql;
3430934308
_this.queryModel.target.rawSql = query.rawSql;
3431034309

3431134310
var q = _this.queryModel.expend_macros(options);
3431234311

34312+
_this.queryModel.target.rawSql = tmpQ;
3431334313
return _this.doQuery(q, options.panelId + query.refId).then(function (response) {
3431434314
return _response_parser2.default.parseDataQuery(response, query.format);
3431534315
});

dist/module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bigquery_query.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@ export default class BigQueryQuery {
434434
}
435435

436436
public expend_macros(options) {
437-
console.log(this.target.rawSql)
438437
if (this.target.rawSql) {
439438
let q = this.target.rawSql;
440439
q = this.replaceTimeFilters(q, options);

src/datasource.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ export class BigQueryDatasource {
9595
return this.$q.when({ data: [] });
9696
}
9797
const allQueryPromise = _.map(queries, query => {
98+
const tmpQ = this.queryModel.target.rawSql;
9899
this.queryModel.target.rawSql = query.rawSql;
99100
const q = this.queryModel.expend_macros(options);
101+
this.queryModel.target.rawSql = tmpQ;
100102
return this.doQuery(q, options.panelId + query.refId).then(response => {
101103
return ResponseParser.parseDataQuery(response, query.format);
102104
});

0 commit comments

Comments
 (0)