mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fixed loading of default.json
This commit is contained in:
parent
7bd7e3b691
commit
430bdd0343
@ -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)
|
||||
})
|
||||
|
@ -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)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user