Merge branch 'v4.4.x'

This commit is contained in:
Torkel Ödegaard 2017-09-13 10:02:04 +02:00
commit 1a53d6453b

View File

@ -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