Prechádzať zdrojové kódy

Singlestat panel: Fixed error handling, when query fail do not show last value, Fixes #1647

Torkel Ödegaard 10 rokov pred
rodič
commit
f343a46ca4
1 zmenil súbory, kde vykonal 3 pridanie a 2 odobranie
  1. 3 2
      src/app/panels/singlestat/module.js

+ 3 - 2
src/app/panels/singlestat/module.js

@@ -81,9 +81,10 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
       panelHelper.updateTimeRange($scope);
       panelHelper.updateTimeRange($scope);
 
 
       return panelHelper.issueMetricQuery($scope, datasource)
       return panelHelper.issueMetricQuery($scope, datasource)
-        .then($scope.dataHandler)
-        .then(null, function() {
+        .then($scope.dataHandler, function(err) {
+          $scope.series = [];
           $scope.render();
           $scope.render();
+          throw err;
         });
         });
     };
     };