Commit 5be5ee9b by Torkel Ödegaard

Fixed panel error handling issue

parent 58034c24
......@@ -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 {
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;
......
......@@ -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;
});
};
......
......@@ -116,7 +116,7 @@
opacity: .7;
position: relative;
left: 7px;
top: 3px;
top: 5px;
font-size: 150%;
}
}
......
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