minor GUI pre style update & logout js error fix

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

Branch: refs/heads/1.3.x
Commit: 1a269c3bd002eafc026fb5a381d007e536a120fc
Parents: 2fc9dcb
Author: Jason <[email protected]>
Authored: Tue May 24 17:11:23 2016 +0800
Committer: Jason <[email protected]>
Committed: Tue May 24 17:11:23 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/page.js | 4 ++--
 webapp/app/less/app.less          | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/1a269c3b/webapp/app/js/controllers/page.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/page.js 
b/webapp/app/js/controllers/page.js
index 8382032..c40ec5d 100644
--- a/webapp/app/js/controllers/page.js
+++ b/webapp/app/js/controllers/page.js
@@ -109,7 +109,7 @@ KylinApp.controller('PageCtrl', function ($scope, $q, 
AccessService, $modal, $lo
   // common acl methods
   $scope.hasPermission = function (entity) {
     var curUser = UserService.getCurUser();
-    if (!curUser) {
+    if (!curUser.userDetails) {
       return curUser;
     }
 
@@ -124,7 +124,7 @@ KylinApp.controller('PageCtrl', function ($scope, $q, 
AccessService, $modal, $lo
     if (entity) {
       angular.forEach(entity.accessEntities, function (acessEntity, index) {
         if (masks.indexOf(acessEntity.permission.mask) != -1) {
-          if ((curUser.userDetails.username == acessEntity.sid.principal) || 
UserService.hasRole(acessEntity.sid.grantedAuthority)) {
+          if ((curUser && curUser.userDetails.username == 
acessEntity.sid.principal) || 
UserService.hasRole(acessEntity.sid.grantedAuthority)) {
             hasPermission = true;
           }
         }

http://git-wip-us.apache.org/repos/asf/kylin/blob/1a269c3b/webapp/app/less/app.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/app.less b/webapp/app/less/app.less
index 7bf6b01..94f4959 100644
--- a/webapp/app/less/app.less
+++ b/webapp/app/less/app.less
@@ -646,3 +646,10 @@ input:-moz-placeholder {
 .dropdown-menu{
   z-index:9999;
 }
+pre {
+  white-space: pre-wrap;
+  white-space: -moz-pre-wrap;
+  white-space: -pre-wrap;
+  white-space: -o-pre-wrap;
+  word-wrap: break-word;
+}

Reply via email to