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/07/13 03:35:28 UTC

kylin git commit: KYLIN-1683

Repository: kylin
Updated Branches:
  refs/heads/master 1a3527cc2 -> 933a5f614


KYLIN-1683


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

Branch: refs/heads/master
Commit: 933a5f61492787a1b73efbdf5113ebbf3ce52eb0
Parents: 1a3527c
Author: luguosheng1314 <55...@qq.com>
Authored: Thu Jul 13 11:27:34 2017 +0800
Committer: chenzhx <34...@qq.com>
Committed: Thu Jul 13 11:31:54 2017 +0800

----------------------------------------------------------------------
 webapp/app/css/AdminLTE.css                     |  6 ++-
 webapp/app/js/controllers/cubeAdvanceSetting.js |  3 ++
 webapp/app/less/layout.less                     |  2 +-
 .../cubeDesigner/advanced_settings.html         | 55 ++++++++++++++------
 4 files changed, 46 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/933a5f61/webapp/app/css/AdminLTE.css
----------------------------------------------------------------------
diff --git a/webapp/app/css/AdminLTE.css b/webapp/app/css/AdminLTE.css
index 34e94e5..9864a77 100644
--- a/webapp/app/css/AdminLTE.css
+++ b/webapp/app/css/AdminLTE.css
@@ -25,10 +25,12 @@ body {
   -moz-osx-font-smoothing: grayscale;
   font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
   font-weight: 400;
+  /*overflow-x: hidden;*/
+  /*overflow-y: auto;*/
+}
+#main{
   overflow-x: hidden;
-  overflow-y: auto;
 }
-
 /* Layout */
 .wrapper {
   min-height: 100%;

http://git-wip-us.apache.org/repos/asf/kylin/blob/933a5f61/webapp/app/js/controllers/cubeAdvanceSetting.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index d3e2922..7d375da 100644
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -101,6 +101,9 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
       $scope.refreshRowKey($scope.convertedRowkeys,i,$scope.convertedRowkeys[i]);
     }
   }
+  $scope.sortableOptions = {
+    update:$scope.resortRowkey
+  };
 
   $scope.addNewHierarchy = function(grp){
     grp.select_rule.hierarchy_dims.push([]);

http://git-wip-us.apache.org/repos/asf/kylin/blob/933a5f61/webapp/app/less/layout.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/layout.less b/webapp/app/less/layout.less
index d9501f2..bf19746 100644
--- a/webapp/app/less/layout.less
+++ b/webapp/app/less/layout.less
@@ -20,7 +20,7 @@
 }
 
 body {
-  overflow: auto !important;
+  //overflow: auto !important;
   min-width: 960px;
 
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/933a5f61/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 f0c3bcd..8062975 100755
--- a/webapp/app/partials/cubeDesigner/advanced_settings.html
+++ b/webapp/app/partials/cubeDesigner/advanced_settings.html
@@ -193,10 +193,7 @@
 
           <div style="margin-left:42px">
               <div class="box-body">
-                <br/>
-
-
-                <table style="margin-left:width:92%"
+                <table style="margin-left:42px; width:92%;position:relative"
                        ng-if="cubeMetaFrame.rowkey.rowkey_columns.length > 0"
                        class="table table-hover table-bordered list">
                   <thead>
@@ -209,49 +206,74 @@
                   </tr>
                   </thead>
 
-                  <tbody ui-sortable="{update:resortRowkey()}" ng-model="convertedRowkeys">
+                  <tbody ng-if="state.mode!=='edit'" ng-model="convertedRowkeys">
+                <!--<tbody ng-if="state.mode!='edit'" ng-model="convertedRowkeys">-->
+
+                <tr ng-repeat="rowkey_column in convertedRowkeys track by $index">
+
+                  <td>
+                    <!-- ID -->
+                    <span class="ng-binding">{{($index + 1)}}</span>
+                  </td>
+                  <td>
+                    <!--Column Name -->
+                    <span>{{rowkey_column.column}}</span>
+                  </td>
+
+                  <td>
+                    <span>{{rowkey_column.encoding}}</span>
+
+                  </td>
+                  <td>
+                    <span>{{rowkey_column.valueLength}}</span>
+                  </td>
+
+                  <td>
+                   <span>{{rowkey_column.isShardBy}}</span>
+                  </td>
+                </tr>
+                </tbody>
+
+
+                  <tbody ng-show="state.mode=='edit'" ui-sortable="sortableOptions" ng-model="convertedRowkeys">
+                  <!--<tbody ng-if="state.mode!='edit'" ng-model="convertedRowkeys">-->
 
                   <tr ng-repeat="rowkey_column in convertedRowkeys track by $index"
-                      ng-class="state.mode=='edit'?'sort-item':''">
+                      class="sort-item">
 
                     <td>
                       <!-- ID -->
-                      <span class="ng-binding" ng-class="state.mode=='edit'?'badge':''">{{($index + 1)}}</span>
+                      <span class="ng-binding badge">{{($index + 1)}}</span>
                     </td>
                     <td>
                       <!--Column Name -->
-                      <input type="text" class="form-control" placeholder="Column Name.." ng-if="state.mode=='edit'"
+                      <input type="text" class="form-control" placeholder="Column Name.."
                              ng-change="refreshRowKey(convertedRowkeys,$index,rowkey_column)"  ng-disabled="true"
                              tooltip="rowkey column name.." tooltip-trigger="focus"
                              ng-model="rowkey_column.column" class="form-control">
-
-                      <span ng-if="state.mode=='view'">{{rowkey_column.column}}</span>
                     </td>
 
                     <td>
-                      <select ng-if="state.mode=='edit'" style="width:180px;"     ng-disabled="instance.status=='READY'"
+                      <select  style="width:180px;"     ng-disabled="instance.status=='READY'"
                               chosen ng-model="rowkey_column.encoding"
                               ng-change="refreshRowKey(convertedRowkeys,$index,rowkey_column);"
                               ng-options="dt.value as dt.name for dt in getEncodings(rowkey_column.column)">
                         <option value=""></option>
                       </select>
-                      <span ng-if="state.mode=='view'">{{rowkey_column.encoding}}</span>
-
                     </td>
                     <td>
                       <!--Column Length -->
-                      <input type="text" class="form-control" placeholder="Column Length.." ng-if="state.mode=='edit'"
+                      <input type="text" class="form-control" placeholder="Column Length.."
                              tooltip="rowkey column length.." tooltip-trigger="focus"
                              ng-disabled="rowkey_column.encoding.indexOf('dict')>=0||rowkey_column.encoding.indexOf('date')>=0||rowkey_column.encoding.indexOf('time')>=0||instance.status=='READY'"
                              ng-change="refreshRowKey(convertedRowkeys,$index,rowkey_column);"
                              ng-model="rowkey_column.valueLength" class="form-control">
 
                       <small class="help-block red" ng-show="state.mode=='edit' && rowkey_column.encoding.indexOf('integer')>=0 && (rowkey_column.valueLength>8 || rowkey_column.valueLength<1)">integer encoding column length should between 1 and 8</small>
-                      <span ng-if="state.mode=='view'">{{rowkey_column.valueLength}}</span>
                     </td>
 
                     <td>
-                      <select ng-if="state.mode=='edit'" style="width:180px;"
+                      <select  style="width:180px;"
                               chosen ng-model="rowkey_column.isShardBy"
                               tooltip="false by default"     ng-disabled="instance.status=='READY'"
                               data-placeholder="false by default"
@@ -260,7 +282,6 @@
                         <option value=""></option>
                       </select>
                       <small class="help-block red" ng-show="state.mode=='edit' && rule.shardColumnAvailable==false && rowkey_column.isShardBy == true">at most one 'shard by' column is allowed.</small>
-                      <span ng-if="state.mode=='view'">{{rowkey_column.isShardBy}}</span>
                     </td>
                   </tr>
                   </tbody>