kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [34/50] incubator-kylin git commit: fix KYLIN-517
Date Sat, 14 Mar 2015 00:01:47 GMT
fix KYLIN-517


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

Branch: refs/heads/streaming
Commit: ec0fb0f80e424cfa6983960f861b6c3e69c06c53
Parents: 8dcc9a6
Author: jiazhong <jiazhong@ebay.com>
Authored: Tue Mar 10 14:43:52 2015 +0800
Committer: jiazhong <jiazhong@ebay.com>
Committed: Tue Mar 10 14:43:52 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeDimensions.js     |  1 -
 webapp/app/js/controllers/cubeModel.js          | 21 +++++++++++---------
 webapp/app/less/component.less                  | 14 +++++--------
 .../app/partials/cubeDesigner/data_model.html   | 12 +++++------
 .../app/partials/cubeDesigner/dimensions.html   |  2 +-
 5 files changed, 23 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ec0fb0f8/webapp/app/js/controllers/cubeDimensions.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeDimensions.js b/webapp/app/js/controllers/cubeDimensions.js
index e57e05b..f323d1f 100644
--- a/webapp/app/js/controllers/cubeDimensions.js
+++ b/webapp/app/js/controllers/cubeDimensions.js
@@ -395,7 +395,6 @@ KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal,MetaModel)
{
     if ($scope.state.mode == 'edit') {
         $scope.$on('$destroy', function () {
            // $scope.dimensionsAdapter();
-
             // Emit dimensions edit event in order to re-generate row key.
             $scope.$emit('DimensionsEdited');
         });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ec0fb0f8/webapp/app/js/controllers/cubeModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeModel.js b/webapp/app/js/controllers/cubeModel.js
index 1e5fab0..2874742 100644
--- a/webapp/app/js/controllers/cubeModel.js
+++ b/webapp/app/js/controllers/cubeModel.js
@@ -18,7 +18,7 @@
 
 'use strict';
 
-KylinApp.controller('CubeModelCtrl', function ($scope, $modal,cubeConfig,ModelService,MetaModel,SweetAlert)
{
+KylinApp.controller('CubeModelCtrl', function ($scope, $modal,cubeConfig,ModelService,MetaModel,SweetAlert,$log)
{
 
     $scope.cubeConfig = cubeConfig;
     var DataModel = function () {
@@ -138,17 +138,20 @@ KylinApp.controller('CubeModelCtrl', function ($scope, $modal,cubeConfig,ModelSe
             }
         };
 
+
+    $scope.addNewJoin = function(){
+        $scope.newLookup.join.primary_key.push("null");
+        $scope.newLookup.join.foreign_key.push("null");
+    };
+
+    $scope.removeJoin = function($index){
+        $scope.newLookup.join.primary_key.splice($index,1);
+        $scope.newLookup.join.foreign_key.splice($index,1);
+    };
+
     $scope.resetParams = function () {
         $scope.lookupState.editing = false;
         $scope.lookupState.editingIndex = -1;
-
         $scope.newLookup = Lookup();
     };
-
-    // This is for legacy compatibility, assign 'fact_table' property. TODO new cube schema
change.
-//    $scope.$on('$destroy', function () {
-//        if (!$scope.cubeMetaFrame.fact_table) {
-//            $scope.cubeMetaFrame.fact_table = $scope.cubeMetaFrame.model.fact_table;
-//        }
-//    });
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ec0fb0f8/webapp/app/less/component.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/component.less b/webapp/app/less/component.less
index c7bd1cf..4caf964 100644
--- a/webapp/app/less/component.less
+++ b/webapp/app/less/component.less
@@ -828,18 +828,14 @@ span.input-icon {
   background-color: #C6C41D;
 }
 
-//style fix chosen bug
-#derived .localytics-chosen,#derived .chosen-container{
-  width:85% !important;
-}
-#hierarchy .localytics-chosen,#hierarchy .chosen-container {
-  width: 100% !important;
-}
-
 .sort-item {
     padding: 2px;
     width: 50px;
     height: 20px;
     cursor: move;
-//    border-left: 1px solid #333;
+}
+
+.cube-dimension .dl-horizontal{
+  margin-top: 0px !important;
+  margin-bottom: 0px !important;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ec0fb0f8/webapp/app/partials/cubeDesigner/data_model.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/data_model.html b/webapp/app/partials/cubeDesigner/data_model.html
index bdfda69..4aeb1da 100644
--- a/webapp/app/partials/cubeDesigner/data_model.html
+++ b/webapp/app/partials/cubeDesigner/data_model.html
@@ -78,7 +78,7 @@
                 <!-- Join Condition -->
                 <td>
                     <ul class="list-unstyled">
-                        <li ng-repeat="pk in lookup.join.primary_key">
+                        <li ng-repeat="pk in lookup.join.primary_key track by $index">
                             <code>{{lookup.table + '.' + pk}} = {{metaModel.model.fact_table
+ '.' + lookup.join.foreign_key[$index]}}</code>
                         </li>
                     </ul>
@@ -146,11 +146,9 @@
                                                 ng-options="columns.name as columns.name
for columns in getColumnsByTable(metaModel.model.fact_table)" >
                                             <option value=""></option>
                                         </select>
-                                        <button class="pull-right btn btn-xs btn-danger"
style="cursor: pointer" tooltip="Delete Join Condition"
-                                                ng-click="newLookup.join.primary_key.length=newLookup.join.primary_key.length-1;
-                                                                removeElement(newLookup.join.primary_key,
newLookup.join.primary_key[$index]);
-                                                                removeElement(newLookup.join.foreign_key,
newLookup.join.foreign_key[$index]);">
-                                            <i class="fa fa-trash-o"></i>
+                                        <button class="pull-right btn btn-xs btn-danger"
style="cursor: pointer" tooltip="Delete"
+                                                ng-click="removeJoin($index);">
+                                            <i class="fa fa-trash-o pointer"></i>
                                         </button>
                                     </div>
                                     <div class="space-4"></div>
@@ -163,7 +161,7 @@
                             <div class="col-sm-3">
                                 <button class="btn btn-xs btn-info"
                                         ng-if="newLookup.join.type"
-                                        ng-click="newLookup.join.primary_key.length=newLookup.join.primary_key.length+1;
">
+                                        ng-click="addNewJoin();">
                                     <i class="fa fa-plus"></i> New Join Condition</button>
                             </div>
                         </div>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ec0fb0f8/webapp/app/partials/cubeDesigner/dimensions.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/dimensions.html b/webapp/app/partials/cubeDesigner/dimensions.html
index acb351f..dbbc46d 100644
--- a/webapp/app/partials/cubeDesigner/dimensions.html
+++ b/webapp/app/partials/cubeDesigner/dimensions.html
@@ -58,7 +58,7 @@
                 <th ng-if="state.mode=='edit'">Actions</th>
             </tr>
         </thead>
-        <tbody>
+        <tbody class="cube-dimension">
             <tr ng-repeat="dimension in cubeMetaFrame.dimensions | filter:dimState.filter
track by $index">
                 <!--ID -->
                 <td>


Mime
View raw message