You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/12/26 06:03:28 UTC
kylin git commit: minor,
display dashboard and cube planner if enabled in KylinConfig
Repository: kylin
Updated Branches:
refs/heads/master 1d1627a9a -> 5f2eff68d
minor, display dashboard and cube planner if enabled in KylinConfig
Signed-off-by: lidongsjtu <li...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/5f2eff68
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/5f2eff68
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/5f2eff68
Branch: refs/heads/master
Commit: 5f2eff68d80ea6264d7590e14c052114c3cd6b74
Parents: 1d1627a
Author: LauraXia123 <la...@gmail.com>
Authored: Tue Dec 26 13:43:21 2017 +0800
Committer: lidongsjtu <li...@apache.org>
Committed: Tue Dec 26 14:02:35 2017 +0800
----------------------------------------------------------------------
webapp/app/js/controllers/cube.js | 3 ++-
webapp/app/js/controllers/page.js | 1 +
webapp/app/partials/cubes/cube_detail.html | 2 +-
webapp/app/partials/header.html | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/5f2eff68/webapp/app/js/controllers/cube.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cube.js b/webapp/app/js/controllers/cube.js
index c0e5efb..35911d3 100755
--- a/webapp/app/js/controllers/cube.js
+++ b/webapp/app/js/controllers/cube.js
@@ -18,12 +18,13 @@
'use strict';
-KylinApp.controller('CubeCtrl', function ($scope, AccessService, MessageService, CubeService, cubeConfig, TableService, ModelGraphService, UserService,SweetAlert,loadingRequest,modelsManager,$modal,cubesManager, $location) {
+KylinApp.controller('CubeCtrl', function ($scope, $rootScope, AccessService, MessageService, CubeService, cubeConfig, TableService, ModelGraphService, UserService,SweetAlert,loadingRequest,modelsManager,$modal,cubesManager, $location) {
$scope.newAccess = null;
$scope.state = {jsonEdit: false};
$scope.modelsManager = modelsManager;
$scope.cubesManager = cubesManager;
+ $scope.isShowCubeplanner = $rootScope.isShowCubeplanner;
$scope.buildGraph = function (cube) {
ModelGraphService.buildTree(cube);
http://git-wip-us.apache.org/repos/asf/kylin/blob/5f2eff68/webapp/app/js/controllers/page.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/page.js b/webapp/app/js/controllers/page.js
index 8008225..83cc798 100644
--- a/webapp/app/js/controllers/page.js
+++ b/webapp/app/js/controllers/page.js
@@ -24,6 +24,7 @@ KylinApp.controller('PageCtrl', function ($scope, $q, AccessService, $modal, $lo
kylinConfig.init().$promise.then(function (data) {
$log.debug(data);
kylinConfig.initWebConfigInfo();
+ $rootScope.isShowCubeplanner = kylinConfig.getProperty('kylin.cube.cubeplanner.enabled') === 'true'
});
$rootScope.userAction = {
'islogout': false
http://git-wip-us.apache.org/repos/asf/kylin/blob/5f2eff68/webapp/app/partials/cubes/cube_detail.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubes/cube_detail.html b/webapp/app/partials/cubes/cube_detail.html
index cc41b63..38806e1 100755
--- a/webapp/app/partials/cubes/cube_detail.html
+++ b/webapp/app/partials/cubes/cube_detail.html
@@ -41,7 +41,7 @@
ng-if="userService.hasRole('ROLE_ADMIN')">
<a href="" ng-click="cube.visiblePage='hbase';getHbaseInfo(cube)">Storage</a>
</li>
- <li class="{{cube.visiblePage=='planner'? 'active':''}}" ng-if="userService.hasRole('ROLE_ADMIN') || hasPermission(cube, permissions.ADMINISTRATION.mask)">
+ <li class="{{cube.visiblePage=='planner'? 'active':''}}" ng-if="(userService.hasRole('ROLE_ADMIN') || hasPermission(cube, permissions.ADMINISTRATION.mask)) && isShowCubeplanner">
<a href="" ng-click="cube.visiblePage='planner';getCubePlanner(cube);">Planner</a>
</li>
</ul>
http://git-wip-us.apache.org/repos/asf/kylin/blob/5f2eff68/webapp/app/partials/header.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/header.html b/webapp/app/partials/header.html
index fd22f9c..9f1a7e6 100644
--- a/webapp/app/partials/header.html
+++ b/webapp/app/partials/header.html
@@ -53,7 +53,7 @@
<li class="{{activeTab=='admin'?'purple':'green'}}" ng-if="userService.hasRole('ROLE_ADMIN')">
<a href="admin">System</a>
</li>
- <li class="{{activeTab=='dashboard'?'purple':'green'}}" ng-if="userService.isAuthorized()">
+ <li class="{{activeTab=='dashboard'?'purple':'green'}}" ng-if="userService.isAuthorized() && isShowCubeplanner">
<a href="dashboard">Dashboard</a>
</li>
</ul>