mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(templating): fixed duplicate dashboard refresh when changing template variable, #7654
This commit is contained in:
parent
46ac8c098f
commit
e73b306e0c
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user