|
|
@ -96,13 +96,12 @@ export class TimePickerCtrl { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
openDropdown() { |
|
|
|
openDropdown() { |
|
|
|
|
|
|
|
this.$rootScope.appEvent('escTimepicker'); |
|
|
|
if (this.isOpen) { |
|
|
|
if (this.isOpen) { |
|
|
|
this.isOpen = false; |
|
|
|
this.isOpen = false; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$rootScope.appEvent('openTimepicker'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.onRefresh(); |
|
|
|
this.onRefresh(); |
|
|
|
this.editTimeRaw = this.timeRaw; |
|
|
|
this.editTimeRaw = this.timeRaw; |
|
|
|
this.timeOptions = rangeUtil.getRelativeTimesList(this.panel, this.rangeString); |
|
|
|
this.timeOptions = rangeUtil.getRelativeTimesList(this.panel, this.rangeString); |
|
|
@ -118,6 +117,7 @@ export class TimePickerCtrl { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
applyCustom() { |
|
|
|
applyCustom() { |
|
|
|
|
|
|
|
this.$rootScope.appEvent('escTimepicker'); |
|
|
|
if (this.refresh.value !== this.dashboard.refresh) { |
|
|
|
if (this.refresh.value !== this.dashboard.refresh) { |
|
|
|
this.timeSrv.setAutoRefresh(this.refresh.value); |
|
|
|
this.timeSrv.setAutoRefresh(this.refresh.value); |
|
|
|
} |
|
|
|
} |
|
|
@ -139,6 +139,7 @@ export class TimePickerCtrl { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setRelativeFilter(timespan) { |
|
|
|
setRelativeFilter(timespan) { |
|
|
|
|
|
|
|
this.$rootScope.appEvent('escTimepicker'); |
|
|
|
var range = { from: timespan.from, to: timespan.to }; |
|
|
|
var range = { from: timespan.from, to: timespan.to }; |
|
|
|
|
|
|
|
|
|
|
|
if (this.panel.nowDelay && range.to === 'now') { |
|
|
|
if (this.panel.nowDelay && range.to === 'now') { |
|
|
|