You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ch...@apache.org on 2017/12/05 09:55:09 UTC

kylin git commit: KYLIN 3067 provide dim cap in GUL

Repository: kylin
Updated Branches:
  refs/heads/master 6474e22fe -> f3ae1c42d


KYLIN 3067 provide dim cap in GUL


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

Branch: refs/heads/master
Commit: f3ae1c42d21be10affb0e3feb81056b85c1849cf
Parents: 6474e22
Author: chenzhx <ch...@apache.org>
Authored: Mon Dec 4 12:24:55 2017 +0800
Committer: chenzhx <ch...@apache.org>
Committed: Tue Dec 5 17:54:49 2017 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeAdvanceSetting.js   |  6 ++++++
 .../partials/cubeDesigner/advanced_settings.html  | 18 +++++++++++++++++-
 webapp/app/partials/cubeDesigner/measures.html    |  3 ++-
 .../partials/cubeDesigner/streamingConfig.html    |  3 ++-
 4 files changed, 27 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f3ae1c42/webapp/app/js/controllers/cubeAdvanceSetting.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index 8704ed8..7758238 100755
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -23,6 +23,7 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
 
   var needLengthKeyList=cubeConfig.needSetLengthEncodingList;
   $scope.convertedRowkeys = [];
+  $scope.dim_cap = $scope.cubeMetaFrame.aggregation_groups.length > 0 && $scope.cubeMetaFrame.aggregation_groups[0].select_rule.dim_cap ? $scope.cubeMetaFrame.aggregation_groups[0].select_rule.dim_cap : 0;
   angular.forEach($scope.cubeMetaFrame.rowkey.rowkey_columns,function(item){
     item.encoding=$scope.removeVersion(item.encoding);
     var _valueLength;
@@ -104,6 +105,11 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
   $scope.sortableOptions = {
     stop:$scope.resortRowkey
   };
+  $scope.changeDimCap  = function (dim_cap) {
+    angular.forEach($scope.cubeMetaFrame.aggregation_groups, function (agg) {
+      agg.select_rule.dim_cap = dim_cap
+    })
+  }
 
   $scope.addNewHierarchy = function(grp){
     grp.select_rule.hierarchy_dims.push([]);

http://git-wip-us.apache.org/repos/asf/kylin/blob/f3ae1c42/webapp/app/partials/cubeDesigner/advanced_settings.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/advanced_settings.html b/webapp/app/partials/cubeDesigner/advanced_settings.html
index c423097..cc7e264 100755
--- a/webapp/app/partials/cubeDesigner/advanced_settings.html
+++ b/webapp/app/partials/cubeDesigner/advanced_settings.html
@@ -33,7 +33,15 @@
                  class="table table-hover list">
             <tr class="row">
               <th class="col-xs-1">ID</th>
-              <th class="col-xs-11">Aggregation Groups</th>
+              <th class="col-xs-3">
+                <span>Aggregation Groups</span>
+                <span style="margin-left:42px">
+                  <i kylinpopover placement="left" title="Max Dimension Combination" template="dimCapTip.html" class="fa fa-info-circle"></i>
+                  Max Dimension Combination:
+                  <input onInput="this.value=this.value.replace(/[^0-9]/g, '')" type="text" ng-model="dim_cap" ng-change="changeDimCap(dim_cap)" ng-disabled="state.mode !== 'edit'" style="margin-left:5px; width:20px;">
+                </span>
+              </th>
+              <th></th>
               <th ng-if="state.mode=='edit'" class="col-xs-1"></th>
             </tr>
 
@@ -580,6 +588,14 @@
    </ng-form>
  </div>
 
+<script type="text/ng-template" id="dimCapTip.html">
+  <div>
+    <ol style="font-size:12px;">
+      <li>Dimension limitations mean max dimensions may be contained within a group of SQL queries.</li>
+      <li>In a set of queries, if each query required the number of dimensions is not more than five, you can set 5 here.</li>
+    </ol>
+  </div>
+</script>
 <script type="text/ng-template" id="rowkeyTip.html">
   <div>
     <h4>Shard By this column?</h4>

http://git-wip-us.apache.org/repos/asf/kylin/blob/f3ae1c42/webapp/app/partials/cubeDesigner/measures.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/measures.html b/webapp/app/partials/cubeDesigner/measures.html
index aa7a096..7d4a606 100755
--- a/webapp/app/partials/cubeDesigner/measures.html
+++ b/webapp/app/partials/cubeDesigner/measures.html
@@ -206,7 +206,8 @@
                                    type="text" placeholder="Kylin won’t save more than this number of bytes" class="form-control"
                                    tooltip-trigger="focus"
                                    ng-init="newMeasure.function.returntype=newMeasure.function.returntype?newMeasure.function.returntype:'extendedcolumn(100)'"
-                                   ng-model="newMeasure.function.returntype" required />
+                                   ng-model="newMeasure.function.returntype" required
+                                   onInput="this.value=this.value.replace(/[^0-9]/g, '')" />
 
                             <span class="font-color-default"
                                   ng-if="newMeasure.function.expression != 'COUNT_DISTINCT' && newMeasure.function.expression != 'TOP_N' && newMeasure.function.expression != 'EXTENDED_COLUMN' ">

http://git-wip-us.apache.org/repos/asf/kylin/blob/f3ae1c42/webapp/app/partials/cubeDesigner/streamingConfig.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/streamingConfig.html b/webapp/app/partials/cubeDesigner/streamingConfig.html
index b18b425..24b3438 100644
--- a/webapp/app/partials/cubeDesigner/streamingConfig.html
+++ b/webapp/app/partials/cubeDesigner/streamingConfig.html
@@ -224,7 +224,8 @@
                 <input ng-if="state.mode=='edit'" name="timeout" required ng-model="kafkaMeta.timeout" type="text"
                        placeholder="Input kafkaConfig timeout"
                        ng-pattern="/^\+?[1-9][0-9]*$/"
-                       class="form-control"/>
+                       class="form-control"
+                       onInput="this.value=this.value.replace(/[^0-9]/g, '')"/>
                 <small class="help-block"
                        ng-show="!form.cube_streaming_form.timeout.$error.required && form.cube_streaming_form.timeout.$invalid && (form.cube_streaming_form.timeout.$dirty||form.cube_streaming_form.$submitted)">
                   Kafka timeout is invalid.