Commit 355e8c85 by Rashid Khan

Add default loading to service to fix dashboards with missing services

parent 33370423
...@@ -491,7 +491,6 @@ angular.module('kibana.services', []) ...@@ -491,7 +491,6 @@ angular.module('kibana.services', [])
window.localStorage['dashboard'] !== '' window.localStorage['dashboard'] !== ''
) { ) {
var dashboard = JSON.parse(window.localStorage['dashboard']); var dashboard = JSON.parse(window.localStorage['dashboard']);
_.defaults(dashboard,_dash);
self.dash_load(dashboard); self.dash_load(dashboard);
// No? Ok, grab default.json, its all we have now // No? Ok, grab default.json, its all we have now
} else { } else {
...@@ -532,6 +531,9 @@ angular.module('kibana.services', []) ...@@ -532,6 +531,9 @@ angular.module('kibana.services', [])
// Cancel all timers // Cancel all timers
timer.cancel_all(); 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 not using time based indices, use the default index
if(dashboard.index.interval === 'none') { if(dashboard.index.interval === 'none') {
self.indices = [dashboard.index.default]; self.indices = [dashboard.index.default];
......
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