mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 11:20:27 -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.setTime(this.time, true);
|
||||
}
|
||||
} else {
|
||||
} else if (this.timeHasChangedSinceLoad()) {
|
||||
this.setTime(this.timeAtLoad, true);
|
||||
}
|
||||
}
|
||||
|
||||
private timeHasChangedSinceLoad() {
|
||||
return this.timeAtLoad.from !== this.time.from || this.timeAtLoad.to !== this.time.to;
|
||||
}
|
||||
|
||||
setAutoRefresh(interval) {
|
||||
this.dashboard.refresh = interval;
|
||||
if (interval) {
|
||||
|
Loading…
Reference in New Issue
Block a user