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/2aeca11e
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2aeca11e
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2aeca11e

Branch: refs/heads/1.4-rc
Commit: 2aeca11e6979ea89ea7ba2bac016d87743f85622
Parents: dbb2674
Author: janzhongi <jiazh...@ebay.com>
Authored: Tue Feb 23 14:51:00 2016 +0800
Committer: janzhongi <jiazh...@ebay.com>
Committed: Tue Feb 23 14:51:00 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeEdit.js  | 2 +-
 webapp/app/js/controllers/modelEdit.js | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/2aeca11e/webapp/app/js/controllers/cubeEdit.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeEdit.js 
b/webapp/app/js/controllers/cubeEdit.js
index 4f7d67d..5901c4f 100755
--- a/webapp/app/js/controllers/cubeEdit.js
+++ b/webapp/app/js/controllers/cubeEdit.js
@@ -785,7 +785,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/2aeca11e/webapp/app/js/controllers/modelEdit.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/modelEdit.js 
b/webapp/app/js/controllers/modelEdit.js
index b908a96..34c0bd5 100644
--- a/webapp/app/js/controllers/modelEdit.js
+++ b/webapp/app/js/controllers/modelEdit.js
@@ -210,9 +210,9 @@ KylinApp.controller('ModelEditCtrl', function ($scope, $q, 
$routeParams, $locati
     }
 
     $scope.$watch('projectModel.selectedProject', function (newValue, 
oldValue) {
-        if(!newValue){
-            return;
-        }
+      if(!$scope.projectModel.getSelectedProject()) {
+        return;
+      }
         var param = {
             ext: true,
             project:newValue

Reply via email to