Fixed panel error handling issue

This commit is contained in:
Torkel Ödegaard
2015-03-05 12:25:48 +01:00
parent 58034c24ce
commit 5be5ee9b1b
3 changed files with 6 additions and 11 deletions
+3 -8
View File
@@ -104,14 +104,9 @@ function (angular, _, config) {
$scope.getCurrentDatasource().then(function(datasource) {
$scope.datasource = datasource;
var promise = $scope.refreshData($scope.datasource);
if (promise) {
promise.then(function() { $scope.panelMeta.loading = false; });
} else {
$scope.panelMeta.loading = false;
}
return $scope.refreshData($scope.datasource) || $q.when({});
}).then(function() {
$scope.panelMeta.loading = false;
}, function(err) {
console.log('Panel data error:', err);
$scope.panelMeta.loading = false;
+2 -2
View File
@@ -129,10 +129,10 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
$scope.annotationsPromise = annotationsSrv.getAnnotations($scope.rangeUnparsed, $scope.dashboard);
return panelHelper.issueMetricQuery($scope, datasource)
.then($scope.dataHandler)
.then(null, function() {
.then($scope.dataHandler, function(err) {
$scope.seriesList = [];
$scope.render([]);
throw err;
});
};
+1 -1
View File
@@ -116,7 +116,7 @@
opacity: .7;
position: relative;
left: 7px;
top: 3px;
top: 5px;
font-size: 150%;
}
}