KYLIN-1248 fix streaming table auto generate convert issue
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/5e585092 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/5e585092 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/5e585092 Branch: refs/heads/1.4-rc Commit: 5e585092c21620a357c4800de633ce58f13f590b Parents: 01010b8 Author: janzhongi <jiazh...@ebay.com> Authored: Fri Feb 26 14:32:07 2016 +0800 Committer: janzhongi <jiazh...@ebay.com> Committed: Fri Feb 26 14:32:07 2016 +0800 ---------------------------------------------------------------------- webapp/app/js/controllers/sourceMeta.js | 26 +++++++++++++------------ webapp/app/partials/tables/table_load.html | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/5e585092/webapp/app/js/controllers/sourceMeta.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/controllers/sourceMeta.js b/webapp/app/js/controllers/sourceMeta.js index 8d9421f..abdeeb8 100755 --- a/webapp/app/js/controllers/sourceMeta.js +++ b/webapp/app/js/controllers/sourceMeta.js @@ -255,22 +255,24 @@ KylinApp }); } + var firstCommit = false; if($scope.columnList.length==0){ - $scope.columnList = columnList; + firstCommit = true; } - angular.forEach(columnList,function(item){ - var included = false; - for(var i=0;i<$scope.columnList.length;i++){ - if($scope.columnList[i].name==item.name){ - included = true; - break; + if(!firstCommit){ + angular.forEach(columnList,function(item){ + for(var i=0;i<$scope.columnList.length;i++){ + if($scope.columnList[i].name==item.name){ + item.checked = $scope.columnList[i].checked; + item.type = $scope.columnList[i].type; + item.fromSource = $scope.columnList[i].fromSource; + break; + } } - } - if(!included){ - $scope.columnList.push(item); - } - }) + }) + } + $scope.columnList = columnList; } http://git-wip-us.apache.org/repos/asf/kylin/blob/5e585092/webapp/app/partials/tables/table_load.html ---------------------------------------------------------------------- diff --git a/webapp/app/partials/tables/table_load.html b/webapp/app/partials/tables/table_load.html index 468208b..29a2e9a 100644 --- a/webapp/app/partials/tables/table_load.html +++ b/webapp/app/partials/tables/table_load.html @@ -85,7 +85,7 @@ </form> <table class="table table-hover table-bordered"> <tr> - <th>Check As Column</th> + <th></th> <th>Column</th> <th>Column Type</th> <th>Comment</th> @@ -103,7 +103,7 @@ <select chosen ng-model="column.type" ng-options="type as type for type in tableConfig.dataTypes" data-placeholder="select a column type" - style="width: 200px !important;" + style="width: 120px !important;" class="chosen-select"> </select> </td>