You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/03/14 01:01:41 UTC

[28/50] incubator-kylin git commit: fix KYLIN-220

fix KYLIN-220


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

Branch: refs/heads/streaming
Commit: 4905a59ef46eec8b32260440ac3f099660e20969
Parents: f983e6c
Author: jiazhong <ji...@ebay.com>
Authored: Mon Mar 9 18:25:39 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Mon Mar 9 18:25:39 2015 +0800

----------------------------------------------------------------------
 webapp/app/less/component.less                  |   9 +-
 .../cubeDesigner/advanced_settings.html         | 141 ++++++++++---------
 2 files changed, 81 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4905a59e/webapp/app/less/component.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/component.less b/webapp/app/less/component.less
index 4817d99..c7bd1cf 100644
--- a/webapp/app/less/component.less
+++ b/webapp/app/less/component.less
@@ -835,6 +835,11 @@ span.input-icon {
 #hierarchy .localytics-chosen,#hierarchy .chosen-container {
   width: 100% !important;
 }
-#joinon .localytics-chosen,#joinon .chosen-container {
-  width: 45% !important;
+
+.sort-item {
+    padding: 2px;
+    width: 50px;
+    height: 20px;
+    cursor: move;
+//    border-left: 1px solid #333;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4905a59e/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 dfa05c6..164ca05 100755
--- a/webapp/app/partials/cubeDesigner/advanced_settings.html
+++ b/webapp/app/partials/cubeDesigner/advanced_settings.html
@@ -91,73 +91,80 @@
         <h4 style="margin-left:42px">Rowkeys</h4>
         <table style="margin-left:42px; width:92%"
                ng-if="cubeMetaFrame.rowkey.rowkey_columns.length > 0"
-               class="table table-hover list">
-            <tr>
-                <th>ID</th>
-                <th>Column</th>
-                <th>Mandatory</th>
-                <th>Dictionary</th>
-                <th>Length</th>
-                <th ng-if="state.mode=='edit'"></th>
-            </tr>
-
-            <tr ng-repeat="rowkey_column in cubeMetaFrame.rowkey.rowkey_columns">
-                <td>
-                    <!-- ID -->
-                    <b>{{($index + 1)}}</b>
-                </td>
-                <td>
-                    <!--Column Name -->
-                    <input type="text" class="form-control" placeholder="Column Name.." ng-if="state.mode=='edit'"
-                           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>
-                    <!-- Mandatory -->
-                    <button type="button " ng-if="state.mode=='edit'"
-                            class="btn btn-xs btn-default {{rowkey_column.mandatory? 'active':''}}"
-                            ng-model="rowkey_column.mandatory"
-                            ng-click="updateMandatory(rowkey_column);"
-                            btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false">
-                        {{rowkey_column.mandatory? 'Y':'N'}}
-                    </button>
-
-                    <span ng-if="state.mode=='view'">{{rowkey_column.mandatory? 'Y':'N'}}</span>
-                </td>
-
-                <td>
-                    <!--Use Dictionary-->
-                    <div>
-                        <select ng-if="state.mode=='edit'" style="width:80px;"
-                                chosen ng-model="rowkey_column.dictionary"
-                                ng-change="dictionaryUpdated(rowkey_column);"
-                                ng-options="dt as dt for dt in cubeConfig.dictionaries">
-                            <option value=""></option>
-                        </select>
-                        <span ng-if="state.mode=='view'">{{rowkey_column.dictionary}}</span>
-                    </div>
-                </td>
-
-                <td>
-                    <!--Column Length -->
-                    <input type="text" class="form-control" placeholder="Column Length.." ng-if="state.mode=='edit'"
-                           tooltip="rowkey column length.." tooltip-trigger="focus"
-                           ng-disabled="rowkey_column.dictionary=='true'"
-                           ng-model="rowkey_column.length"  class="form-control">
-
-                    <span ng-if="state.mode=='view'">{{rowkey_column.length}}</span>
-                </td>
-
-
-                <td ng-if="state.mode=='edit'">
-                    <button class="btn btn-xs btn-info"
-                            ng-click="removeElement(cubeMetaFrame.rowkey.rowkey_columns, rowkey_column)"><i
-                            class="fa fa-minus"></i>
-                    </button>
-                </td>
-            </tr>
+               class="table table-hover list"
+                >
+           <thead>
+                <tr>
+                    <th>ID</th>
+                    <th>Column</th>
+                    <th>Mandatory</th>
+                    <th>Dictionary</th>
+                    <th>Length</th>
+                    <th ng-if="state.mode=='edit'"></th>
+                </tr>
+           </thead>
+
+            <tbody ui-sortable="state.mode=='edit'" ng-model="cubeMetaFrame.rowkey.rowkey_columns">
+
+                <tr  ng-repeat="rowkey_column in cubeMetaFrame.rowkey.rowkey_columns" ng-class="state.mode=='edit'?'sort-item':''">
+
+                    <td>
+                        <!-- ID -->
+                        <span class="ng-binding" ng-class="state.mode=='edit'?'badge':''">{{($index + 1)}}</span>
+                    </td>
+                    <td>
+                        <!--Column Name -->
+                        <input type="text" class="form-control" placeholder="Column Name.." ng-if="state.mode=='edit'"
+                               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>
+                        <!-- Mandatory -->
+                        <button type="button " ng-if="state.mode=='edit'"
+                                class="btn btn-xs btn-default {{rowkey_column.mandatory? 'active':''}}"
+                                ng-model="rowkey_column.mandatory"
+                                ng-click="updateMandatory(rowkey_column);"
+                                btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false">
+                            {{rowkey_column.mandatory? 'Y':'N'}}
+                        </button>
+
+                        <span ng-if="state.mode=='view'">{{rowkey_column.mandatory? 'Y':'N'}}</span>
+                    </td>
+
+                    <td>
+                        <!--Use Dictionary-->
+                        <div>
+                            <select ng-if="state.mode=='edit'" style="width:80px;"
+                                    chosen ng-model="rowkey_column.dictionary"
+                                    ng-change="dictionaryUpdated(rowkey_column);"
+                                    ng-options="dt as dt for dt in cubeConfig.dictionaries">
+                                <option value=""></option>
+                            </select>
+                            <span ng-if="state.mode=='view'">{{rowkey_column.dictionary}}</span>
+                        </div>
+                    </td>
+
+                    <td>
+                        <!--Column Length -->
+                        <input type="text" class="form-control" placeholder="Column Length.." ng-if="state.mode=='edit'"
+                               tooltip="rowkey column length.." tooltip-trigger="focus"
+                               ng-disabled="rowkey_column.dictionary=='true'"
+                               ng-model="rowkey_column.length"  class="form-control">
+
+                        <span ng-if="state.mode=='view'">{{rowkey_column.length}}</span>
+                    </td>
+
+
+                    <td ng-if="state.mode=='edit'">
+                        <button class="btn btn-xs btn-info"
+                                ng-click="removeElement(cubeMetaFrame.rowkey.rowkey_columns, rowkey_column)"><i
+                                class="fa fa-minus"></i>
+                        </button>
+                    </td>
+                </tr>
+            </tbody>
         </table>
 
         <button class="btn btn-sm btn-info" style="margin-left:42px"