mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 08:14:33 +08:00
make suggested filter macro depend on type
This commit is contained in:
@ -523,8 +523,11 @@ export class PostgresQueryCtrl extends QueryCtrl {
|
||||
|
||||
getWhereOptions() {
|
||||
var options = [];
|
||||
options.push(this.uiSegmentSrv.newSegment({ type: 'macro', value: '$__timeFilter' }));
|
||||
// options.push(this.uiSegmentSrv.newSegment({ type: 'macro', value: '$__unixEpochFilter' }));
|
||||
if (this.queryModel.hasUnixEpochTimecolumn()) {
|
||||
options.push(this.uiSegmentSrv.newSegment({ type: 'macro', value: '$__unixEpochFilter' }));
|
||||
} else {
|
||||
options.push(this.uiSegmentSrv.newSegment({ type: 'macro', value: '$__timeFilter' }));
|
||||
}
|
||||
options.push(this.uiSegmentSrv.newSegment({ type: 'expression', value: 'Expression' }));
|
||||
return this.$q.when(options);
|
||||
}
|
||||
|
Reference in New Issue
Block a user