You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by co...@apache.org on 2016/01/13 11:29:37 UTC

incubator-zeppelin git commit: Restore Navbar connection status for websocket only

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master d277c510f -> a70aadfd1


Restore Navbar connection status for websocket only

### What is this PR for?
After the Shiro PR was merged, the Navbar status was changed to include the token status/name, however that part is reserved to show the Websocket status. Because of that it usually show a green circle with Disconnected next to it.
This PR sets the status to Websocket only.

### What type of PR is it?
Bug Fix

### Is there a relevant Jira issue?
No

### How should this be tested?
You shouldn't see see Disconnected next to a green round in the navbar anymore

### Screenshots (if appropriate)
Bug:
<img width="386" alt="screen shot 2016-01-13 at 12 02 24 pm" src="https://cloud.githubusercontent.com/assets/6766992/12283801/927d05e8-b9ed-11e5-8911-9725b4a7c94a.png">

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Sejun Ra <se...@nflabs.com>

Closes #628 from sejunra/fix/NavbarConnectedStatus and squashes the following commits:

ee8a2fd [Sejun Ra] Restore Navbar connection status for websocket only


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

Branch: refs/heads/master
Commit: a70aadfd10466440f4b3278a5d35ca12ea5fb518
Parents: d277c51
Author: Sejun Ra <se...@nflabs.com>
Authored: Wed Jan 13 11:42:30 2016 +0900
Committer: Damien CORNEAU <co...@gmail.com>
Committed: Wed Jan 13 19:29:23 2016 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/home/home.css                      | 2 +-
 zeppelin-web/src/components/navbar/navbar.controller.js | 3 ---
 zeppelin-web/src/components/navbar/navbar.html          | 4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/a70aadfd/zeppelin-web/src/app/home/home.css
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/home/home.css b/zeppelin-web/src/app/home/home.css
index 6130c2e..0202142 100644
--- a/zeppelin-web/src/app/home/home.css
+++ b/zeppelin-web/src/app/home/home.css
@@ -184,7 +184,7 @@ a.navbar-brand:hover {
 
 .server-status {
   font-size: 12px;
-  margin-top: 6px;
+  margin-top: 8px;
 }
 
 .server-connected {

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/a70aadfd/zeppelin-web/src/components/navbar/navbar.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/navbar/navbar.controller.js b/zeppelin-web/src/components/navbar/navbar.controller.js
index 2f03e1a..30e6ac2 100644
--- a/zeppelin-web/src/components/navbar/navbar.controller.js
+++ b/zeppelin-web/src/components/navbar/navbar.controller.js
@@ -23,7 +23,6 @@ angular.module('zeppelinWebApp').controller('NavCtrl', function($scope, $rootSco
   vm.connected = websocketMsgSrv.isConnected();
   vm.websocketMsgSrv = websocketMsgSrv;
   vm.arrayOrderingSrv = arrayOrderingSrv;
-  vm.authenticated = $rootScope.ticket.principal !== 'anonymous';
 
   angular.element('#notebook-list').perfectScrollbar({suppressScrollX: true});
 
@@ -52,8 +51,6 @@ angular.module('zeppelinWebApp').controller('NavCtrl', function($scope, $rootSco
     websocketMsgSrv.getNotebookList();
   }
 
-  vm.authenticated = $rootScope.ticket.principal !== 'anonymous';
-
   function isActive(noteId) {
     return ($routeParams.noteId === noteId);
   }

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/a70aadfd/zeppelin-web/src/components/navbar/navbar.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/navbar/navbar.html b/zeppelin-web/src/components/navbar/navbar.html
index 20ee024..86a8512 100644
--- a/zeppelin-web/src/components/navbar/navbar.html
+++ b/zeppelin-web/src/components/navbar/navbar.html
@@ -73,8 +73,8 @@ limitations under the License.
         </li>
         <li class="server-status">
           <i class="fa fa-circle" ng-class="{'server-connected':navbar.connected, 'server-disconnected':!navbar.connected}"></i>
-          <span ng-show="navbar.authenticated">{{ticket.principal}} connected</span>
-          <span ng-show="!navbar.authenticated">Disconnected</span>
+          <span ng-show="navbar.connected">Connected</span>
+          <span ng-show="!navbar.connected">Disconnected</span>
         </li>
       </ul>
     </div>