From acf8a77bdc79fe1dca17863cbb31a131bb56331d Mon Sep 17 00:00:00 2001 From: jiazhong Date: Wed, 19 Nov 2014 10:50:42 +0800 Subject: [PATCH] use new name for src table array in cube edit --- webapp/app/js/controllers/cubeEdit.js | 3 +-- webapp/app/js/controllers/sourceMeta.js | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/webapp/app/js/controllers/cubeEdit.js b/webapp/app/js/controllers/cubeEdit.js index 80264d8..2fd0a0b 100644 --- a/webapp/app/js/controllers/cubeEdit.js +++ b/webapp/app/js/controllers/cubeEdit.js @@ -46,12 +46,11 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $locatio }; $scope.dictionaries = ['date(yyyy-mm-dd)', 'string']; - $scope.srcTables = []; $scope.srcTablesInProject = []; $scope.getColumnsByTable = function (name) { var temp = null; - angular.forEach($scope.srcTables, function (table) { + angular.forEach($scope.srcTablesInProject, function (table) { if (table.name == name) { temp = table.columns; } diff --git a/webapp/app/js/controllers/sourceMeta.js b/webapp/app/js/controllers/sourceMeta.js index 6a070d0..c82588d 100644 --- a/webapp/app/js/controllers/sourceMeta.js +++ b/webapp/app/js/controllers/sourceMeta.js @@ -79,7 +79,7 @@ KylinApp }); return defer.promise; - } + }; $scope.$watch('project.selectedProject', function (newValue, oldValue) { if(newValue){ @@ -101,7 +101,7 @@ KylinApp else { $scope.selectedSrcTable.selectedSrcColumn = table; } - } + }; $scope.aceSrcTbChanged = function () { $scope.srcTables = {}; @@ -109,7 +109,7 @@ KylinApp $scope.selectedSrcDb = {}; $scope.selectedSrcTable = {}; $scope.aceSrcTbLoaded(true); - } + }; $scope.treeOptions = { nodeChildren: "columns", @@ -123,7 +123,7 @@ KylinApp label: "a6", labelSelected: "a8" } - } + }; $scope.openModal = function () { $modal.open({ @@ -144,7 +144,7 @@ KylinApp } } }); - } + }; var ModalInstanceCtrl = function ($scope,$location, $modalInstance, tableNames, MessageService,projectName,hiveTbLoad) { hiveTbLoad.status = "init";