ソースを参照

Graph: graph spinner should not stop until annotation request is complete, #1235

Torkel Ödegaard 11 年 前
コミット
1b3bddd622
1 ファイル変更3 行追加2 行削除
  1. 3 2
      src/app/panels/graph/module.js

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

@@ -146,10 +146,9 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
     };
     };
 
 
     $scope.dataHandler = function(results) {
     $scope.dataHandler = function(results) {
-      $scope.panelMeta.loading = false;
-
       // png renderer returns just a url
       // png renderer returns just a url
       if (_.isString(results)) {
       if (_.isString(results)) {
+        $scope.panelMeta.loading = false;
         $scope.render(results);
         $scope.render(results);
         return;
         return;
       }
       }
@@ -164,9 +163,11 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
 
 
       $scope.annotationsPromise
       $scope.annotationsPromise
         .then(function(annotations) {
         .then(function(annotations) {
+          $scope.panelMeta.loading = false;
           $scope.seriesList.annotations = annotations;
           $scope.seriesList.annotations = annotations;
           $scope.render($scope.seriesList);
           $scope.render($scope.seriesList);
         }, function() {
         }, function() {
+          $scope.panelMeta.loading = false;
           $scope.render($scope.seriesList);
           $scope.render($scope.seriesList);
         });
         });
     };
     };