You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/09/03 03:31:17 UTC
[02/50] [abbrv] incubator-kylin git commit: KYLIN-946,
fix error when refresh [Tables] page
KYLIN-946, fix error when refresh [Tables] page
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/39bd19a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/39bd19a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/39bd19a9
Branch: refs/heads/0.7
Commit: 39bd19a9dd0d3c1fcb86a312775c8d70211339d7
Parents: b549275
Author: jiazhong <ji...@ebay.com>
Authored: Fri Aug 14 18:46:31 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Fri Aug 14 18:47:54 2015 +0800
----------------------------------------------------------------------
webapp/app/js/controllers/sourceMeta.js | 12 +++++++++---
webapp/app/js/model/projectModel.js | 3 +++
2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/39bd19a9/webapp/app/js/controllers/sourceMeta.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/sourceMeta.js b/webapp/app/js/controllers/sourceMeta.js
index 85307f8..d05dc7f 100755
--- a/webapp/app/js/controllers/sourceMeta.js
+++ b/webapp/app/js/controllers/sourceMeta.js
@@ -43,6 +43,11 @@ KylinApp
};
$scope.aceSrcTbLoaded = function (forceLoad) {
+ //stop request when project invalid
+ if(!$scope.projectModel.getSelectedProject()){
+ TableModel.init();
+ return;
+ }
if (forceLoad) {
$httpDefaultCache.removeAll();
}
@@ -53,11 +58,12 @@ KylinApp
SweetAlert.swal('Oops...',resp, 'error');
});
};
-
+ $scope.aceSrcTbLoaded();
$scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
// will load table when enter this page,null or not
- $scope.aceSrcTbLoaded();
-
+ if (newValue != oldValue || newValue == null) {
+ $scope.aceSrcTbLoaded();
+ }
});
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/39bd19a9/webapp/app/js/model/projectModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/projectModel.js b/webapp/app/js/model/projectModel.js
index a23fba5..8f466e7 100644
--- a/webapp/app/js/model/projectModel.js
+++ b/webapp/app/js/model/projectModel.js
@@ -28,6 +28,9 @@ KylinApp.service('ProjectModel', function () {
}
};
this.getSelectedProject = function (project) {
+ if(this.selectedProject=="_null"){
+ return null;
+ }
return this.selectedProject;
};