You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2020/02/21 03:21:33 UTC
[kylin] 04/06: KYLIN-4338 Web page modification to support global
domain dict
This is an automated email from the ASF dual-hosted git repository.
nic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 47e2ebebff4d987a767c84c969d2d3e035ad3b93
Author: wangxiaojing <wa...@didichuxing.com>
AuthorDate: Mon Jan 13 21:11:07 2020 +0800
KYLIN-4338 Web page modification to support global domain dict
---
webapp/app/js/controllers/cubeAdvanceSetting.js | 35 ++++++++++++++------
.../partials/cubeDesigner/advanced_settings.html | 38 ++++++++++++++++++----
2 files changed, 57 insertions(+), 16 deletions(-)
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index 1b7bcd1..4b6252e 100755
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -177,12 +177,14 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
}
- $scope.isReuse=false;
+ $scope.isReuse=1;
$scope.addNew=false;
$scope.newDictionaries = {
"column":null,
"builder": null,
- "reuse": null
+ "reuse": null,
+ "model": null,
+ "cube": null
}
$scope.initUpdateDictionariesStatus = function(){
@@ -198,11 +200,13 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
$scope.updateDictionariesStatus.isEdit = true;
$scope.addNew=true;
$scope.updateDictionariesStatus.editIndex = index;
- if(dictionaries.builder==null){
- $scope.isReuse=true;
+ if(dictionaries.builder==null && dictionaries.model==null){
+ $scope.isReuse=2;
+ }else if (dictionaries.model!=null){
+ $scope.isReuse=3;
}
else{
- $scope.isReuse=false;
+ $scope.isReuse=1;
}
}
else{
@@ -231,7 +235,7 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
$scope.initUpdateDictionariesStatus();
$scope.nextDictionariesInit();
$scope.addNew = !$scope.addNew;
- $scope.isReuse = false;
+ $scope.isReuse = 1;
return true;
};
@@ -240,7 +244,9 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
$scope.nextDic = {
"coiumn":null,
"builder":null,
- "reuse":null
+ "reuse":null,
+ "model":null,
+ "cube":null
}
}
@@ -261,16 +267,25 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
$scope.clearNewDictionaries = function (){
$scope.newDictionaries = null;
- $scope.isReuse=false;
+ $scope.isReuse=1;
$scope.initUpdateDictionariesStatus();
$scope.nextDictionariesInit();
$scope.addNew=!$scope.addNew;
}
- $scope.change = function (){
+ $scope.change = function (type){
$scope.newDictionaries.builder=null;
$scope.newDictionaries.reuse=null;
- $scope.isReuse=!$scope.isReuse;
+ $scope.newDictionaries.domain=null;
+ $scope.newDictionaries.model=null;
+ $scope.newDictionaries.cube=null;
+ if(type == 'domain'){
+ $scope.isReuse=3;
+ }else if (type == 'builder'){
+ $scope.isReuse=1;
+ }else if (type == 'reuse'){
+ $scope.isReuse=2;
+ }
}
$scope.removeElement = function(arr,element){
diff --git a/webapp/app/partials/cubeDesigner/advanced_settings.html b/webapp/app/partials/cubeDesigner/advanced_settings.html
index fbd8cdc..94c7d44 100755
--- a/webapp/app/partials/cubeDesigner/advanced_settings.html
+++ b/webapp/app/partials/cubeDesigner/advanced_settings.html
@@ -412,7 +412,7 @@
</td>
<td>
<!--Reuse-->
- <span>{{dictionaries.reuse}}</span>
+ <span>{{dictionaries.model}}.{{dictionaries.cube}}.{{dictionaries.reuse}}</span>
</td>
<td ng-if="state.mode=='edit'">
<!--Edit Button -->
@@ -444,7 +444,7 @@
</div>
<div class="box-body">
<div class="row">
- <div class="col-xs-8">
+ <div class="col-xs-12">
<!--Column-->
<div class="form-group middle-popover">
<div class="row">
@@ -462,15 +462,20 @@
<div class="form-group">
<div class="row" style="margin-left:5px;">
<label class="radio-inline ng-binding ng-scope">
- <input type="radio" name="reuse" ng-value=false ng-model="isReuse" ng-change="change()"/><b>Builder Class</b>
+ <input type="radio" name="reuse" ng-value=1 ng-model="isReuse" ng-change="change('builder')"/><b>Builder Class</b>
</label>
<label class="radio-inline ng-binding ng-scope">
- <input type="radio" name="reuse" ng-value=true ng-model="isReuse" ng-change="change()"/><b>Reuse</b>
+ <input type="radio" name="reuse" ng-value=2 ng-model="isReuse" ng-change="change('reuse')"/><b>Reuse Self</b>
</label>
+ <!-- tiretree add-->
+ <label class="radio-inline ng-binding ng-scope">
+ <input type="radio" name="reuse" ng-value=3 ng-model="isReuse" ng-change="change('domain')"/><b>Reuse Global Domain</b>
+ </label>
+ <!-- tiretree end-->
</div>
</div>
<!--Builder-->
- <div class="form-group" ng-if="!isReuse" >
+ <div class="form-group" ng-if="isReuse==1" >
<div class="row">
<label class="col-xs-12 col-sm-3 control-label no-padding-right font-color-default"><b>Builder Class</b></label>
<div class="col-xs-12 col-sm-6">
@@ -484,7 +489,7 @@
</div>
</div>
<!--Reuse-->
- <div class="form-group middle-popover" ng-if="isReuse" >
+ <div class="form-group middle-popover" ng-if="isReuse==2" >
<div class="row">
<label class="col-xs-12 col-sm-3 control-label no-padding-right font-color-default"><b>Reuse</b></label>
<div class="col-xs-12 col-sm-6">
@@ -497,6 +502,27 @@
</div>
</div>
</div>
+ <!-- Tiretree global dic model cube table.colname start-->
+ <div class="form-group middle-popover" ng-if="isReuse==3" >
+ <div class="row">
+ <label class="col-xs-6 col-sm-4 control-label no-padding-right" ng-class="{'has-error':newDictionaries.model==''}">
+ <b ng-if="state.mode=='view'">{{dictionaries.model}}</b>
+ <input ng-model="newDictionaries.model" placeholder="Reuse Model Name" required class="form-control" ng-if="state.mode=='edit'"/>
+ <small style="font-weight: normal !important;" class="help-block" ng-show="newDictionaries.model==''">Reuse Model Name is required.</small>
+ </label>
+ <div class="col-xs-6 col-sm-4" ng-class="{'has-error':newDictionaries.cube==''}">
+ <input ng-model="newDictionaries.cube" placeholder="Reuse Cube Name" class="form-control" ng-if="state.mode=='edit'" required/>
+ <small class="help-block" ng-show="newDictionaries.cube==''">Reuse Cube Name is required.</small>
+ <span ng-if="state.mode=='view'">{{dictionaries.cube}}</span>
+ </div>
+ <div class="col-xs-12 col-sm-4" ng-class="{'has-error':newDictionaries.reuse==''}">
+ <input ng-model="newDictionaries.reuse" placeholder="Reuse table.column" class="form-control" ng-if="state.mode=='edit'" required/>
+ <small class="help-block" ng-show="newDictionaries.reuse==''">Reuse table.column is required.</small>
+ <span ng-if="state.mode=='view'">{{dictionaries.reuse}}</span>
+ </div>
+ </div>
+ </div>
+ <!--end -->
</div>
</div>
</div>