Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 4dd1b3438 -> ce5bcd2b0


minor,UI check project in API param


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

Branch: refs/heads/2.x-staging
Commit: ce5bcd2b0882bbf0e130ebaeb6ec30af1e978507
Parents: 4dd1b34
Author: janzhongi <jiazh...@ebay.com>
Authored: Tue Feb 23 14:48:28 2016 +0800
Committer: janzhongi <jiazh...@ebay.com>
Committed: Tue Feb 23 14:48:52 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeEdit.js  | 2 +-
 webapp/app/js/controllers/modelEdit.js | 8 ++++----
 webapp/app/js/model/tableModel.js      | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/ce5bcd2b/webapp/app/js/controllers/cubeEdit.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeEdit.js 
b/webapp/app/js/controllers/cubeEdit.js
index 8259ab1..2968a9b 100755
--- a/webapp/app/js/controllers/cubeEdit.js
+++ b/webapp/app/js/controllers/cubeEdit.js
@@ -676,7 +676,7 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, 
$routeParams, $locatio
   }
 
   $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
-    if (!newValue) {
+    if(!$scope.projectModel.getSelectedProject()) {
       return;
     }
     var param = {

http://git-wip-us.apache.org/repos/asf/kylin/blob/ce5bcd2b/webapp/app/js/controllers/modelEdit.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/modelEdit.js 
b/webapp/app/js/controllers/modelEdit.js
index 111ca91..d0785dc 100644
--- a/webapp/app/js/controllers/modelEdit.js
+++ b/webapp/app/js/controllers/modelEdit.js
@@ -208,10 +208,10 @@ KylinApp.controller('ModelEditCtrl', function ($scope, 
$q, $routeParams, $locati
     }
 
     $scope.$watch('projectModel.selectedProject', function (newValue, 
oldValue) {
-        if(!newValue){
-            return;
-        }
-        var param = {
+      if(!$scope.projectModel.getSelectedProject()) {
+        return;
+      }
+      var param = {
             ext: true,
             project:newValue
         };

http://git-wip-us.apache.org/repos/asf/kylin/blob/ce5bcd2b/webapp/app/js/model/tableModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/tableModel.js 
b/webapp/app/js/model/tableModel.js
index 767c555..bb124c9 100755
--- a/webapp/app/js/model/tableModel.js
+++ b/webapp/app/js/model/tableModel.js
@@ -60,12 +60,12 @@ KylinApp.service('TableModel', 
function(ProjectModel,$q,TableService,$log) {
             project:ProjectModel.selectedProject
         };
 
-        if(!ProjectModel.selectedProject){
+        
if(!ProjectModel.selectedProject||!ProjectModel.isSelectedProjectValid()){
             defer.resolve();
             return defer.promise;
         }
 
-        TableService.list(param, function (tables) {
+      TableService.list(param, function (tables) {
             var tableMap = [];
             angular.forEach(tables, function (table) {
 

Reply via email to