From 430bdd0343fe9f8243d5a26ec58cfe43c9bd7403 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Thu, 28 Feb 2013 13:02:52 -0700 Subject: [PATCH] fixed loading of default.json --- js/controllers.js | 1 - panels/dashcontrol/module.js | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/controllers.js b/js/controllers.js index 1e1244a5edc..ebcfa3791e5 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -20,7 +20,6 @@ angular.module('kibana.controllers', []) // Load dashboard by event eventBus.register($scope,'dashboard', function(event,dashboard){ - console.log(dashboard) $scope.dashboards = dashboard; _.defaults($scope.dashboards,_d) }) diff --git a/panels/dashcontrol/module.js b/panels/dashcontrol/module.js index 8c563740ef9..2f62f5afdfd 100644 --- a/panels/dashcontrol/module.js +++ b/panels/dashcontrol/module.js @@ -48,6 +48,7 @@ angular.module('kibana.dashcontrol', []) ) { var dashboard = JSON.parse(localStorage['dashboard']); _.defaults(dashboard,_dash); + $scope.dash_load(JSON.stringify(dashboard)) // No? Ok, grab default.json, its all we have now } else { $http({ @@ -56,12 +57,12 @@ angular.module('kibana.dashcontrol', []) }).success(function(data, status, headers, config) { var dashboard = data _.defaults(dashboard,_dash); + $scope.dash_load(JSON.stringify(dashboard)) }).error(function(data, status, headers, config) { $scope.alert('Default dashboard missing!','Could not locate default.json','error') }); } - // Load whatever we have - $scope.dash_load(dashboard) + } }