You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/09/30 22:48:34 UTC
[28/35] git commit: AMBARI-7559 UI sending requests to non-existing
cluster. (atkach)
AMBARI-7559 UI sending requests to non-existing cluster. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ff0e3b0c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ff0e3b0c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ff0e3b0c
Branch: refs/heads/branch-alerts-dev
Commit: ff0e3b0cd6d8e5b72b790dc0fd62d1829b470e98
Parents: cf41087
Author: atkach <at...@hortonworks.com>
Authored: Tue Sep 30 18:19:59 2014 +0300
Committer: atkach <at...@hortonworks.com>
Committed: Tue Sep 30 18:19:59 2014 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/application.js | 4 ++--
ambari-web/app/controllers/main.js | 4 ++--
ambari-web/app/routes/installer.js | 1 +
ambari-web/app/routes/main.js | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/ff0e3b0c/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index 8706fff..2e5370b 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -44,8 +44,8 @@ App.ApplicationController = Em.Controller.extend(App.UserPref, {
}.property('App.router.clusterController.isLoaded','App.router.loggedIn'),
isExistingClusterDataLoaded: function () {
- return !Em.isNone(App.router.get('clusterController.clusterName')) && this.get('isClusterDataLoaded');
- }.property('App.router.clusterController.clusterName', 'isClusterDataLoaded'),
+ return App.router.get('clusterInstallCompleted') && this.get('isClusterDataLoaded');
+ }.property('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
init: function(){
this._super();
http://git-wip-us.apache.org/repos/asf/ambari/blob/ff0e3b0c/ambari-web/app/controllers/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main.js b/ambari-web/app/controllers/main.js
index 55db450..8ab30f5 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -63,11 +63,11 @@ App.MainController = Em.Controller.extend({
},
startPolling: function () {
- if (App.router.get('clusterController.isLoaded')) {
+ if (App.router.get('applicationController.isExistingClusterDataLoaded')) {
App.router.get('updateController').set('isWorking', true);
App.router.get('backgroundOperationsController').set('isWorking', true);
}
- }.observes('App.router.clusterController.isLoaded'),
+ }.observes('App.router.applicationController.isExistingClusterDataLoaded'),
stopPolling: function(){
App.router.get('updateController').set('isWorking', false);
App.router.get('backgroundOperationsController').set('isWorking', false);
http://git-wip-us.apache.org/repos/asf/ambari/blob/ff0e3b0c/ambari-web/app/routes/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js
index 3742428..6c051b8 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -426,6 +426,7 @@ module.exports = Em.Route.extend({
// We need to do recovery based on whether we are in Add Host or Installer wizard
controller.saveClusterState('DEFAULT');
App.router.set('clusterController.isLoaded', false);
+ router.set('clusterInstallCompleted', true);
router.transitionTo('main.dashboard.index');
});
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/ff0e3b0c/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index c3c7ecf..c68f17f 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -31,7 +31,7 @@ module.exports = Em.Route.extend({
if (App.get('testMode')) {
router.get('mainController').initialize();
} else {
- if (App.get('clusterName')) {
+ if (router.get('clusterInstallCompleted')) {
App.router.get('mainController').checkServerClientVersion().done(function () {
App.router.get('clusterController').loadClientServerClockDistance().done(function () {
router.get('mainController').initialize();