Merge pull request #304 from rashidkpc/master

Add default loading to service to fix dashboards with missing services
This commit is contained in:
Rashid Khan
2013-07-30 07:53:44 -07:00
+3 -1
View File
@@ -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];