mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
This commit is contained in:
parent
e763104a6f
commit
91fb3f2224
@ -116,16 +116,14 @@ class TimeSrv {
|
|||||||
|
|
||||||
setAutoRefresh(interval) {
|
setAutoRefresh(interval) {
|
||||||
this.dashboard.refresh = interval;
|
this.dashboard.refresh = interval;
|
||||||
|
this.cancelNextRefresh();
|
||||||
if (interval) {
|
if (interval) {
|
||||||
var intervalMs = kbn.interval_to_ms(interval);
|
var intervalMs = kbn.interval_to_ms(interval);
|
||||||
|
|
||||||
this.$timeout(() => {
|
this.refreshTimer = this.timer.register(this.$timeout(() => {
|
||||||
this.startNextRefreshTimer(intervalMs);
|
this.startNextRefreshTimer(intervalMs);
|
||||||
this.refreshDashboard();
|
this.refreshDashboard();
|
||||||
}, intervalMs);
|
}, intervalMs));
|
||||||
|
|
||||||
} else {
|
|
||||||
this.cancelNextRefresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update url
|
// update url
|
||||||
|
Loading…
Reference in New Issue
Block a user