From 355e8c85856e541cdb29465a031316fd6b908725 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Tue, 30 Jul 2013 07:53:02 -0700 Subject: [PATCH] Add default loading to service to fix dashboards with missing services --- js/services.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/services.js b/js/services.js index e27e255dbc5..b3409f1162b 100644 --- a/js/services.js +++ b/js/services.js @@ -491,7 +491,6 @@ angular.module('kibana.services', []) window.localStorage['dashboard'] !== '' ) { var dashboard = JSON.parse(window.localStorage['dashboard']); - _.defaults(dashboard,_dash); self.dash_load(dashboard); // No? Ok, grab default.json, its all we have now } else { @@ -532,6 +531,9 @@ angular.module('kibana.services', []) // Cancel all timers timer.cancel_all(); + // Make sure the dashboard being loaded has everything required + _.defaults(dashboard,_dash); + // If not using time based indices, use the default index if(dashboard.index.interval === 'none') { self.indices = [dashboard.index.default];