You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by bi...@apache.org on 2017/02/23 07:28:20 UTC
[06/11] kylin git commit: KYLIN 1875 table alias modify
KYLIN 1875 table alias modify
Signed-off-by: Li Yang <li...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/37aab3c6
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/37aab3c6
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/37aab3c6
Branch: refs/heads/master-hbase0.98
Commit: 37aab3c69ef78633367718a5fd85caa398820f2f
Parents: 77df9dc
Author: chenzhx <34...@qq.com>
Authored: Wed Feb 22 17:32:14 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Thu Feb 23 11:32:29 2017 +0800
----------------------------------------------------------------------
webapp/app/js/controllers/modelDataModel.js | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/37aab3c6/webapp/app/js/controllers/modelDataModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/modelDataModel.js b/webapp/app/js/controllers/modelDataModel.js
index cb3305a..15fb20a 100644
--- a/webapp/app/js/controllers/modelDataModel.js
+++ b/webapp/app/js/controllers/modelDataModel.js
@@ -95,13 +95,9 @@ KylinApp.controller('ModelDataModelCtrl', function ($location,$scope, $modal,cub
};
$scope.$watch('newLookup.alias',function(newValue,oldValue){
- if(!newValue){
- return;
- }else{
- for(var i=0;i<$scope.newLookup.join.primary_key.length;i++){
- $scope.newLookup.join.primary_key[i] = $scope.newLookup.join.primary_key[i].replace(oldValue+'.',newValue+'.');
+ for(var i=0;i<$scope.newLookup.join.primary_key.length;i++){
+ $scope.newLookup.join.primary_key[i] = $scope.newLookup.join.primary_key[i].replace(/^.*?\./,newValue+'.');
}
- }
});
$scope.editLookup = function (lookup) {
$scope.lookupState.editingIndex = lookupList.indexOf(lookup);