kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject kylin git commit: KYLIN-3049 Filter the invalid zero value of 'Auto Merge Thresholds' parameter when you create or upate a cube.
Date Wed, 29 Nov 2017 07:09:04 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 1b665cb88 -> 4de64cd33


KYLIN-3049 Filter the invalid zero value of 'Auto Merge Thresholds' parameter when you create
or upate a cube.


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

Branch: refs/heads/master
Commit: 4de64cd33224f0c83bfb55f7cbd5e30bf7ef4dcc
Parents: 1b665cb
Author: peng.jianhua <peng.jianhua@zte.com.cn>
Authored: Mon Nov 27 17:21:21 2017 +0800
Committer: chenzhx <chen@apache.org>
Committed: Wed Nov 29 14:59:38 2017 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeEdit.js |  1 +
 webapp/app/js/utils/utils.js          | 10 ++++++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/4de64cd3/webapp/app/js/controllers/cubeEdit.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeEdit.js b/webapp/app/js/controllers/cubeEdit.js
index 5f78b61..99b298c 100755
--- a/webapp/app/js/controllers/cubeEdit.js
+++ b/webapp/app/js/controllers/cubeEdit.js
@@ -282,6 +282,7 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams,
$locatio
       $scope.cubeMetaFrame.model_name = $scope.cubeMetaFrame.name;
     }
 
+    VdmUtil.removeElementInArrayByValue($scope.cubeMetaFrame.auto_merge_time_ranges, 0);
     $scope.state.project = ProjectModel.getSelectedProject();
 //        delete $scope.cubeMetaFrame.project;
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4de64cd3/webapp/app/js/utils/utils.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/utils/utils.js b/webapp/app/js/utils/utils.js
index 30ad261..9c92a02 100644
--- a/webapp/app/js/utils/utils.js
+++ b/webapp/app/js/utils/utils.js
@@ -169,6 +169,16 @@ KylinApp.factory('VdmUtil', function ($modal, $timeout, $location, $anchorScroll
     },
     isNotExtraKey:function(obj,key){
       return obj&&key&&key!="$promise"&&key!='$resolved'&&obj.hasOwnProperty(key);
+    },
+    removeElementInArrayByValue:function(arr,val){
+      if(!arr || arr.length === 0){
+        return;
+      }
+      for(var i=arr.length-1; i>=0; i--) {
+        if(arr[i] == val) {
+          arr.splice(i, 1);
+        }
+      }
     }
   }
 });


Mime
View raw message