Commit 5be5ee9b by Torkel Ödegaard

Fixed panel error handling issue

parent 58034c24
...@@ -104,14 +104,9 @@ function (angular, _, config) { ...@@ -104,14 +104,9 @@ function (angular, _, config) {
$scope.getCurrentDatasource().then(function(datasource) { $scope.getCurrentDatasource().then(function(datasource) {
$scope.datasource = datasource; $scope.datasource = datasource;
return $scope.refreshData($scope.datasource) || $q.when({});
var promise = $scope.refreshData($scope.datasource); }).then(function() {
if (promise) {
promise.then(function() { $scope.panelMeta.loading = false; });
} else {
$scope.panelMeta.loading = false; $scope.panelMeta.loading = false;
}
}, function(err) { }, function(err) {
console.log('Panel data error:', err); console.log('Panel data error:', err);
$scope.panelMeta.loading = false; $scope.panelMeta.loading = false;
......
...@@ -129,10 +129,10 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) { ...@@ -129,10 +129,10 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
$scope.annotationsPromise = annotationsSrv.getAnnotations($scope.rangeUnparsed, $scope.dashboard); $scope.annotationsPromise = annotationsSrv.getAnnotations($scope.rangeUnparsed, $scope.dashboard);
return panelHelper.issueMetricQuery($scope, datasource) return panelHelper.issueMetricQuery($scope, datasource)
.then($scope.dataHandler) .then($scope.dataHandler, function(err) {
.then(null, function() {
$scope.seriesList = []; $scope.seriesList = [];
$scope.render([]); $scope.render([]);
throw err;
}); });
}; };
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
opacity: .7; opacity: .7;
position: relative; position: relative;
left: 7px; left: 7px;
top: 3px; top: 5px;
font-size: 150%; 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