Fix for auto refresh not being started after loading dashboard, Fixes #655

This commit is contained in:
Torkel Ödegaard 2014-08-07 07:20:56 +02:00
parent 378e55ed0c
commit af073dad46
3 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
# 1.7.0 (unreleased)
**Fixes**
- [Issue #655](https://github.com/grafana/grafana/issues/655). General: Auto refresh not initiated / started after dashboard loading
# 1.7.0-rc1 (2014-08-05)
**New features or improvements**

View File

@ -41,6 +41,11 @@ function (angular, $, config, _) {
window.document.title = 'Grafana - ' + $scope.dashboard.title;
// start auto refresh
if($scope.dashboard.refresh) {
$scope.dashboard.set_interval($scope.dashboard.refresh);
}
dashboardKeybindings.shortcuts($scope);
$scope.emitAppEvent("dashboard-loaded", $scope.dashboard);

View File

@ -28,6 +28,7 @@ function (angular, $, kbn, _) {
this.nav = data.nav || [];
this.time = data.time || { from: 'now-6h', to: 'now' };
this.templating = data.templating || { list: [] };
this.refresh = data.refresh;
if (this.nav.length === 0) {
this.nav.push({ type: 'timepicker' });