Commit af073dad by Torkel Ödegaard

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

parent 378e55ed
# 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) # 1.7.0-rc1 (2014-08-05)
**New features or improvements** **New features or improvements**
......
...@@ -41,6 +41,11 @@ function (angular, $, config, _) { ...@@ -41,6 +41,11 @@ function (angular, $, config, _) {
window.document.title = 'Grafana - ' + $scope.dashboard.title; window.document.title = 'Grafana - ' + $scope.dashboard.title;
// start auto refresh
if($scope.dashboard.refresh) {
$scope.dashboard.set_interval($scope.dashboard.refresh);
}
dashboardKeybindings.shortcuts($scope); dashboardKeybindings.shortcuts($scope);
$scope.emitAppEvent("dashboard-loaded", $scope.dashboard); $scope.emitAppEvent("dashboard-loaded", $scope.dashboard);
......
...@@ -28,6 +28,7 @@ function (angular, $, kbn, _) { ...@@ -28,6 +28,7 @@ function (angular, $, kbn, _) {
this.nav = data.nav || []; this.nav = data.nav || [];
this.time = data.time || { from: 'now-6h', to: 'now' }; this.time = data.time || { from: 'now-6h', to: 'now' };
this.templating = data.templating || { list: [] }; this.templating = data.templating || { list: [] };
this.refresh = data.refresh;
if (this.nav.length === 0) { if (this.nav.length === 0) {
this.nav.push({ type: 'timepicker' }); this.nav.push({ type: 'timepicker' });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment