Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master dd3f08e4a -> acda3de9d


ZEPPELIN-223 fix: reconection in case of disconnection.

Author: Prabhjyot Singh <[email protected]>

Closes #213 from prabhjyotsingh/ZEPPELIN-223 and squashes the following commits:

da1bc74 [Prabhjyot Singh] fix for "Once reconnected, however, any command is 
not working but raising exceptions" when already on notebook page
e83f2d3 [Prabhjyot Singh] ZEPPELIN-223 fix: reconection in case of 
disconnection.


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

Branch: refs/heads/master
Commit: acda3de9d8f36cd63e23d94f61484282e9ad0ef7
Parents: dd3f08e
Author: Prabhjyot Singh <[email protected]>
Authored: Mon Aug 17 12:16:56 2015 +0530
Committer: Lee moon soo <[email protected]>
Committed: Thu Aug 20 15:15:07 2015 -0700

----------------------------------------------------------------------
 zeppelin-web/src/app/notebook/notebook.controller.js    | 12 ++++++++++--
 .../websocketEvents/websocketEvents.factory.js          |  1 +
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/acda3de9/zeppelin-web/src/app/notebook/notebook.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js 
b/zeppelin-web/src/app/notebook/notebook.controller.js
index 07d8325..11a558f 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -35,10 +35,18 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', 
function($scope, $ro
 
   $scope.interpreterSettings = [];
   $scope.interpreterBindings = [];
-  $scope.isNoteDirty = null;  
+  $scope.isNoteDirty = null;
   $scope.saveTimer = null;
 
   var angularObjectRegistry = {};
+  var connectedOnce = false;
+
+  $scope.$on('setConnectedStatus', function(event, param) {
+    if(connectedOnce && param){
+      initNotebook();
+    }
+    connectedOnce = true;
+  });
 
   $scope.getCronOptionNameFromValue = function(value) {
     if (!value) {
@@ -158,7 +166,7 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', 
function($scope, $ro
   };
 
   $scope.setLookAndFeel = function(looknfeel) {
-    $scope.note.config.looknfeel = looknfeel;    
+    $scope.note.config.looknfeel = looknfeel;
     $scope.setConfig();
   };
 

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/acda3de9/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
----------------------------------------------------------------------
diff --git 
a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js 
b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
index 6d9f177..f18e774 100644
--- a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
+++ b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
@@ -17,6 +17,7 @@ angular.module('zeppelinWebApp').factory('websocketEvents', 
function($rootScope,
   var websocketCalls = {};
 
   websocketCalls.ws = $websocket(baseUrlSrv.getWebsocketUrl());
+  websocketCalls.ws.reconnectIfNotNormalClose = true;
 
   websocketCalls.ws.onOpen(function() {
     console.log('Websocket created');

Reply via email to