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

Commit bc6b957

Browse files
authored
Merge pull request #122 from doitintl/issue-120
Fixes #120
2 parents 44f3ca7 + 95e6679 commit bc6b957

File tree

4 files changed

+54508
-27
lines changed

4 files changed

+54508
-27
lines changed

dist/module.js

Lines changed: 54490 additions & 22 deletions
Large diffs are not rendered by default.

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.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
"googleapis": "^37.2.0",
3939
"grafana-sdk-mocks": "github:grafana/grafana-sdk-mocks",
4040
"jest": "^24.5.0",
41+
"lodash": "^4.17.11",
4142
"ng-annotate-webpack-plugin": "^0.3.0",
4243
"plugin-typescript": "^8.0.0",
43-
"plugin-typescript": "^8.0.0",
4444
"prettier": "^1.16.4",
4545
"sinon": "^3.3.0",
4646
"systemjs-plugin-css": "^0.1.35",
@@ -54,7 +54,6 @@
5454
"typescript": "^3.3.4000",
5555
"uglifyjs-webpack-plugin": "^2.1.1",
5656
"webpack": "^4.29.5",
57-
"webpack-cli": "^3.2.3",
58-
"lodash": "^4.17.11"
57+
"webpack-cli": "^3.2.3"
5958
}
6059
}

src/datasource.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,15 @@ export class BigQueryDatasource {
185185
format: target.format,
186186
intervalMs: options.intervalMs,
187187
maxDataPoints: options.maxDataPoints,
188+
metricColumn: target.metricColumn,
189+
partitioned: target.partitioned,
190+
partitionedField: target.partitionedField,
188191
rawSql: queryModel.render(this.interpolateVariable),
189-
refId: target.refId
192+
refId: target.refId,
193+
sharded: target.sharded,
194+
table: target.table,
195+
timeColumn: target.timeColumn,
196+
timeColumnType: target.timeColumnType
190197
};
191198
});
192199

@@ -201,7 +208,14 @@ export class BigQueryDatasource {
201208
});
202209
const allQueryPromise = _.map(queries, query => {
203210
const tmpQ = this.queryModel.target.rawSql;
211+
this.queryModel.target.metricColumn = query.metricColumn;
212+
this.queryModel.target.partitioned = query.partitioned;
213+
this.queryModel.target.partitionedField = query.partitionedField;
204214
this.queryModel.target.rawSql = query.rawSql;
215+
this.queryModel.target.sharded = query.sharded;
216+
this.queryModel.target.table = query.table;
217+
this.queryModel.target.timeColumn = query.timeColumn;
218+
this.queryModel.target.timeColumnType = query.timeColumnType;
205219
const modOptions = BigQueryDatasource._setupTimeShiftQuery(
206220
query,
207221
options

0 commit comments

Comments
 (0)