Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 307BE200D54 for ; Fri, 8 Dec 2017 11:38:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2F140160C0D; Fri, 8 Dec 2017 10:38:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 71F7B160BF2 for ; Fri, 8 Dec 2017 11:38:01 +0100 (CET) Received: (qmail 18943 invoked by uid 500); 8 Dec 2017 10:38:00 -0000 Mailing-List: contact commits-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list commits@kylin.apache.org Received: (qmail 18934 invoked by uid 99); 8 Dec 2017 10:38:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Dec 2017 10:38:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 81D18F1826; Fri, 8 Dec 2017 10:38:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chen@apache.org To: commits@kylin.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: kylin git commit: KYLIN-3062 Hide RAW measure by default in cube designer Date: Fri, 8 Dec 2017 10:38:00 +0000 (UTC) archived-at: Fri, 08 Dec 2017 10:38:02 -0000 Repository: kylin Updated Branches: refs/heads/master c6cfa6984 -> d0c015b82 KYLIN-3062 Hide RAW measure by default in cube designer Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d0c015b8 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d0c015b8 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d0c015b8 Branch: refs/heads/master Commit: d0c015b8219e7d23e4446d4efd4a53c161afd9a4 Parents: c6cfa69 Author: nichunen Authored: Fri Dec 8 15:32:24 2017 +0800 Committer: chenzhx Committed: Fri Dec 8 18:37:47 2017 +0800 ---------------------------------------------------------------------- examples/test_case_data/sandbox/kylin.properties | 2 ++ webapp/app/js/controllers/cubeMeasures.js | 10 +++++++++- webapp/app/js/services/kylinProperties.js | 4 ++++ webapp/app/partials/cubeDesigner/measures.html | 3 ++- 4 files changed, 17 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/d0c015b8/examples/test_case_data/sandbox/kylin.properties ---------------------------------------------------------------------- diff --git a/examples/test_case_data/sandbox/kylin.properties b/examples/test_case_data/sandbox/kylin.properties index 55eb719..90c0b95 100644 --- a/examples/test_case_data/sandbox/kylin.properties +++ b/examples/test_case_data/sandbox/kylin.properties @@ -158,6 +158,8 @@ kylin.web.help.1=odbc|ODBC Driver| kylin.web.help.2=tableau|Tableau Guide| kylin.web.help.3=onboard|Cube Design Tutorial| +# Hide measures in measure list of cube designer, separate by comma +kylin.web.hide-measures=RAW ### OTHER ### http://git-wip-us.apache.org/repos/asf/kylin/blob/d0c015b8/webapp/app/js/controllers/cubeMeasures.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/controllers/cubeMeasures.js b/webapp/app/js/controllers/cubeMeasures.js index 347f3b7..6f70e25 100644 --- a/webapp/app/js/controllers/cubeMeasures.js +++ b/webapp/app/js/controllers/cubeMeasures.js @@ -18,7 +18,7 @@ 'use strict'; -KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubesManager,CubeDescModel,SweetAlert,VdmUtil,TableModel,cubeConfig,modelsManager) { +KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubesManager,CubeDescModel,SweetAlert,VdmUtil,TableModel,cubeConfig,modelsManager,kylinConfig) { $scope.num=0; $scope.convertedColumns=[]; $scope.groupby=[]; @@ -433,6 +433,14 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes }); } + $scope.isMeasureUnHidden = function(measure) { + if (kylinConfig.getHiddenMeasures().indexOf(measure) == -1) { + return true; + } else { + return false; + } + } + }); var NextParameterModalCtrl = function ($scope, scope,para,$modalInstance,cubeConfig, CubeService, MessageService, $location, SweetAlert,ProjectModel, loadingRequest,ModelService) { http://git-wip-us.apache.org/repos/asf/kylin/blob/d0c015b8/webapp/app/js/services/kylinProperties.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/services/kylinProperties.js b/webapp/app/js/services/kylinProperties.js index a2af4ed..fa92e53 100644 --- a/webapp/app/js/services/kylinProperties.js +++ b/webapp/app/js/services/kylinProperties.js @@ -115,5 +115,9 @@ KylinApp.service('kylinConfig', function (AdminService, $log) { return true; } + this.getHiddenMeasures = function() { + var hide_measures = this.getProperty("kylin.web.hide-measures").replace(/\s/g,"").toUpperCase(); + return hide_measures.split(",") + } }); http://git-wip-us.apache.org/repos/asf/kylin/blob/d0c015b8/webapp/app/partials/cubeDesigner/measures.html ---------------------------------------------------------------------- diff --git a/webapp/app/partials/cubeDesigner/measures.html b/webapp/app/partials/cubeDesigner/measures.html index 7d4a606..12d1af3 100755 --- a/webapp/app/partials/cubeDesigner/measures.html +++ b/webapp/app/partials/cubeDesigner/measures.html @@ -104,7 +104,8 @@