@@ -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;
@@ -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%;
}