Skip to content

Commit

Permalink
Merge pull request #304 from rashidkpc/master
Browse files Browse the repository at this point in the history
Add default loading to service to fix dashboards with missing services
  • Loading branch information
Rashid Khan committed Jul 30, 2013
2 parents 068e240 + 355e8c8 commit ed8f7c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit ed8f7c3

Please sign in to comment.