|
@@ -96,11 +96,15 @@ class TimeSrv {
|
|
|
this.initTimeFromUrl();
|
|
this.initTimeFromUrl();
|
|
|
this.setTime(this.time, true);
|
|
this.setTime(this.time, true);
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else if (this.timeHasChangedSinceLoad()) {
|
|
|
this.setTime(this.timeAtLoad, true);
|
|
this.setTime(this.timeAtLoad, true);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private timeHasChangedSinceLoad() {
|
|
|
|
|
+ return this.timeAtLoad.from !== this.time.from || this.timeAtLoad.to !== this.time.to;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
setAutoRefresh(interval) {
|
|
setAutoRefresh(interval) {
|
|
|
this.dashboard.refresh = interval;
|
|
this.dashboard.refresh = interval;
|
|
|
if (interval) {
|
|
if (interval) {
|