mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auto-refresh caused 2 refreshes (and hence mulitple queries) each time (at least in firefox) (Fixes #342)
This commit is contained in:
parent
9a53779b6c
commit
d14a86069a
@ -10,6 +10,7 @@ vNext
|
|||||||
- Series names and column name typeahead cache fix (Fixes #522)
|
- Series names and column name typeahead cache fix (Fixes #522)
|
||||||
- Fixed influxdb issue with raw query that caused wrong value column detection (Fixes #504)
|
- Fixed influxdb issue with raw query that caused wrong value column detection (Fixes #504)
|
||||||
- Default property that marks which datasource is default in config.js is now optional (Fixes #526)
|
- Default property that marks which datasource is default in config.js is now optional (Fixes #526)
|
||||||
|
- Auto-refresh caused 2 refreshes (and hence mulitple queries) each time (at least in firefox) (Fixes #342)
|
||||||
|
|
||||||
# 1.6.0 (2014-06-16)
|
# 1.6.0 (2014-06-16)
|
||||||
|
|
||||||
|
@ -445,20 +445,28 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.start_scheduled_refresh = function (after_ms) {
|
||||||
|
this.cancel_scheduled_refresh();
|
||||||
|
self.refresh_timer = timer.register($timeout(function () {
|
||||||
|
self.start_scheduled_refresh(after_ms);
|
||||||
|
self.refresh();
|
||||||
|
}, after_ms));
|
||||||
|
};
|
||||||
|
|
||||||
|
this.cancel_scheduled_refresh = function () {
|
||||||
|
timer.cancel(self.refresh_timer);
|
||||||
|
};
|
||||||
|
|
||||||
this.set_interval = function (interval) {
|
this.set_interval = function (interval) {
|
||||||
self.current.refresh = interval;
|
self.current.refresh = interval;
|
||||||
if(interval) {
|
if (interval) {
|
||||||
var _i = kbn.interval_to_ms(interval);
|
var _i = kbn.interval_to_ms(interval);
|
||||||
timer.cancel(self.refresh_timer);
|
this.start_scheduled_refresh(_i);
|
||||||
self.refresh_timer = timer.register($timeout(function() {
|
|
||||||
self.set_interval(interval);
|
|
||||||
self.refresh();
|
|
||||||
},_i));
|
|
||||||
self.refresh();
|
|
||||||
} else {
|
} else {
|
||||||
timer.cancel(self.refresh_timer);
|
this.cancel_scheduled_refresh();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user