kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhongj...@apache.org
Subject kylin git commit: minor, UI support close-on-select feature on ui-select
Date Fri, 19 Feb 2016 10:31:16 GMT
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging cd5b0248a -> 406127ac8


minor, UI support close-on-select feature on ui-select


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

Branch: refs/heads/2.x-staging
Commit: 406127ac8adab52f6093863f3f6d3688a9c8b0b7
Parents: cd5b024
Author: janzhongi <jiazhong@ebay.com>
Authored: Fri Feb 19 18:31:46 2016 +0800
Committer: janzhongi <jiazhong@ebay.com>
Committed: Fri Feb 19 18:31:46 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeAdvanceSetting.js        |  1 -
 webapp/app/js/controllers/modelDimensions.js           | 13 ++++++++++++-
 .../app/partials/cubeDesigner/advanced_settings.html   |  4 ++++
 .../app/partials/modelDesigner/model_dimensions.html   |  7 +++++--
 webapp/app/partials/modelDesigner/model_measures.html  |  1 +
 5 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/406127ac/webapp/app/js/controllers/cubeAdvanceSetting.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index e0a8327..dc1a868 100644
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -162,7 +162,6 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
     if (aggregation_groups) {
       list[index] = aggregation_groups;
     }
-    console.log($scope.cubeMetaFrame.aggregation_groups);
   };
 
   $scope.refreshAggregationHierarchy = function (list, index, aggregation_group,hieIndex,hierarchy)
{

http://git-wip-us.apache.org/repos/asf/kylin/blob/406127ac/webapp/app/js/controllers/modelDimensions.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/modelDimensions.js b/webapp/app/js/controllers/modelDimensions.js
index 0e34582..dfe30b8 100644
--- a/webapp/app/js/controllers/modelDimensions.js
+++ b/webapp/app/js/controllers/modelDimensions.js
@@ -58,7 +58,18 @@ KylinApp.controller('ModelDimensionsCtrl', function ($scope, $modal,MetaModel,mo
         this.columns = [];
     }
 
-    // Initialize data for columns widget in auto-gen when add/edit cube.
+  $scope.refreshModelDimensions = function (list, index, dimension) {
+    if (dimension) {
+      list[index].columns.length = dimension.columns.length;
+      for(var i=0;i<dimension.columns.length;i++){
+        list[index].columns[i] = dimension.columns[i];
+      }
+    }
+
+  };
+
+
+  // Initialize data for columns widget in auto-gen when add/edit cube.
     if ($scope.state.mode == 'edit') {
         $scope.initColumns();
     };

http://git-wip-us.apache.org/repos/asf/kylin/blob/406127ac/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 95475a7..936c79a 100755
--- a/webapp/app/partials/cubeDesigner/advanced_settings.html
+++ b/webapp/app/partials/cubeDesigner/advanced_settings.html
@@ -46,6 +46,7 @@
 
                     <ui-select
                       autofocus="true"
+                      close-on-select="false"
                       on-select="refreshAggregationGroup(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group)"
                       on-remove="refreshAggregationGroup(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group)"
                       ng-if="state.mode=='edit'" style="width: 100%" multiple ng-model="aggregation_group.includes">
@@ -76,6 +77,7 @@
                     <!--</select>-->
 
                     <ui-select
+                      close-on-select="false"
                       autofocus="true"
                       on-select="refreshAggregationGroup(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group)"
                       on-remove="refreshAggregationGroup(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group)"
@@ -112,6 +114,7 @@
                           <!--</select>-->
 
                           <ui-select
+                            close-on-select="false"
                             autofocus="true"
                             on-select="refreshAggregationHierarchy(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group,$index,hierarchyDims)"
                             on-remove="refreshAggregationHierarchy(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group,$index,hierarchyDims)"
@@ -157,6 +160,7 @@
                         <td class="col-xs-10">
                           <!-- Dimensions -->
                           <ui-select
+                            close-on-select="false"
                             autofocus="true"
                             on-select="refreshAggregationJoint(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group,$index,jointDims)"
                             on-remove="refreshAggregationJoint(cubeMetaFrame.aggregation_groups,
rowIndex, aggregation_group,$index,jointDims)"

http://git-wip-us.apache.org/repos/asf/kylin/blob/406127ac/webapp/app/partials/modelDesigner/model_dimensions.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/modelDesigner/model_dimensions.html b/webapp/app/partials/modelDesigner/model_dimensions.html
index 9574d2b..2b298c5 100644
--- a/webapp/app/partials/modelDesigner/model_dimensions.html
+++ b/webapp/app/partials/modelDesigner/model_dimensions.html
@@ -60,7 +60,7 @@
                     <th class="col-xs-9">Columns</th>
                 </tr>
 
-                <tr ng-repeat="dimension in modelsManager.selectedModel.dimensions" class="row">
+                <tr ng-repeat="dimension in modelsManager.selectedModel.dimensions track
by $index" class="row">
                     <td class="col-xs-1">
                         <!-- ID -->
                         <b>{{($index + 1)}}</b>
@@ -70,9 +70,12 @@
                     </td>
                     <td class="col-xs-9">
                       <ui-select
+                        close-on-select="false"
                         ng-if="state.mode=='edit'" style="width: 100%"
                         autofocus="true"
-                        ng-model="modelsManager.selectedModel.dimensions[$index].columns"
multiple>
+                        on-select="refreshModelDimensions(modelsManager.selectedModel.dimensions,$index,dimension)"
+                        on-remove="refreshModelDimensions(modelsManager.selectedModel.dimensions,$index,dimension)"
+                        ng-model="dimension.columns" multiple>
                         <ui-select-match placeholder="Select Column...">{{$item.name}}</ui-select-match>
                         <ui-select-choices
                           repeat="column.name as column in getColumnsByTable(dimension.table)
| filter:$select.search">

http://git-wip-us.apache.org/repos/asf/kylin/blob/406127ac/webapp/app/partials/modelDesigner/model_measures.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/modelDesigner/model_measures.html b/webapp/app/partials/modelDesigner/model_measures.html
index 8dc551b..13f9958 100644
--- a/webapp/app/partials/modelDesigner/model_measures.html
+++ b/webapp/app/partials/modelDesigner/model_measures.html
@@ -44,6 +44,7 @@
         <h3 class="box-title">Select your measures</h3>
 
       <ui-select
+        close-on-select="false"
         ng-if="state.mode=='edit'"
         style="width: 100%"
         autofocus="true"


Mime
View raw message