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

Commit c0270bd

Browse files
authored
Merge pull request #132 from doitintl/issue-13-B
UI support form from/to macros
2 parents e99caf2 + 935703e commit c0270bd

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

dist/module.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60936,6 +60936,14 @@ function (_super) {
6093660936
type: "macro",
6093760937
value: "$__timeFilter"
6093860938
}));
60939+
options.push(this.uiSegmentSrv.newSegment({
60940+
type: "macro",
60941+
value: "$__timeFrom"
60942+
}));
60943+
options.push(this.uiSegmentSrv.newSegment({
60944+
type: "macro",
60945+
value: "$__timeTo"
60946+
}));
6093960947
options.push(this.uiSegmentSrv.newSegment({
6094060948
type: "expression",
6094160949
value: "Expression"

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default class BigQueryQuery {
107107
target.metricColumn = target.metricColumn || "none";
108108
target.group = target.group || [];
109109
target.where = target.where || [
110-
{ type: "macro", name: "$__timeFilter", params: [] }
110+
{ type: "macro", name: "$__timeFilter", params: [] },
111111
];
112112
target.select = target.select || [
113113
[{ type: "column", params: ["-- value --"] }]

src/query_ctrl.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,12 @@ export class BigQueryQueryCtrl extends QueryCtrl {
678678
options.push(
679679
this.uiSegmentSrv.newSegment({ type: "macro", value: "$__timeFilter" })
680680
);
681+
options.push(
682+
this.uiSegmentSrv.newSegment({ type: "macro", value: "$__timeFrom" })
683+
);
684+
options.push(
685+
this.uiSegmentSrv.newSegment({ type: "macro", value: "$__timeTo" })
686+
);
681687
options.push(
682688
this.uiSegmentSrv.newSegment({ type: "expression", value: "Expression" })
683689
);

0 commit comments

Comments
 (0)