Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 d67727a29 -> df7c5b468


IGNITE-843 Minor fix.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/df7c5b46
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/df7c5b46
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/df7c5b46

Branch: refs/heads/ignite-843-rc2
Commit: df7c5b468402d88c38f7c4ceec5f5eba26b36c51
Parents: d67727a
Author: Andrey <[email protected]>
Authored: Wed Jan 20 12:42:38 2016 +0700
Committer: Andrey <[email protected]>
Committed: Wed Jan 20 12:42:38 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js            | 11 ++++++++++-
 .../control-center-web/src/main/js/views/sql/sql.jade    |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/df7c5b46/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git 
a/modules/control-center-web/src/main/js/controllers/sql-controller.js 
b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index 1826bfa..7aa71d9 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -19,6 +19,15 @@
 consoleModule.controller('sqlController', function ($http, $timeout, 
$interval, $scope, $animate,  $location, $anchorScroll, $state,
     $modal, $popover, $loading, $common, $confirm, $agentDownload, 
QueryNotebooks, uiGridExporterConstants) {
 
+    $scope.$on('$stateChangeStart', function(event, toState, toParams, 
fromState, fromParams) {
+        if ($scope.notebook && $scope.notebook.paragraphs)
+            $scope.notebook.paragraphs.forEach(function (paragraph) {
+                _tryStopRefresh(paragraph);
+            });
+
+        $agentDownload.stopAwaitAgent();
+    });
+
     $scope.joinTip = $common.joinTip;
 
     $scope.caches = [];
@@ -277,7 +286,7 @@ consoleModule.controller('sqlController', function ($http, 
$timeout, $interval,
     QueryNotebooks.read($scope.demo, $state.params.noteId)
         .then(loadNotebook)
         .catch(function(err) {
-            $scope.notebook = undefined;
+            $scope.notebookLoadFailed = true;
 
             $loading.finish('loading');
         });

http://git-wip-us.apache.org/repos/asf/ignite/blob/df7c5b46/modules/control-center-web/src/main/js/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/sql.jade 
b/modules/control-center-web/src/main/js/views/sql/sql.jade
index f9566b0..3af14a6 100644
--- a/modules/control-center-web/src/main/js/views/sql/sql.jade
+++ b/modules/control-center-web/src/main/js/views/sql/sql.jade
@@ -57,7 +57,7 @@ mixin chart-settings(mdl)
     ignite-loading
         .docs-content(ng-controller='sqlController')
             hr
-            div(ng-if='!notebook' style='text-align: center')
+            div(ng-if='notebookLoadFailed' style='text-align: center')
                 h2 Failed to load notebook
                 label.col-sm-12 Notebook not accessible any more. Go back to 
configuration or open to another notebook.
                 
button.h3.btn.btn-primary(ui-sref='base.configuration.clusters') Back to 
configuration

Reply via email to