KYLIN 1875 table alias modify Signed-off-by: Li Yang <liy...@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 <346839...@qq.com> Authored: Wed Feb 22 17:32:14 2017 +0800 Committer: Li Yang <liy...@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);