incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-3715. Reassign Master Wizard does not display folder and hosts on "Manual commands" page after browser reopening. (alexantonenko)
Date Thu, 07 Nov 2013 18:23:44 GMT
Updated Branches:
  refs/heads/trunk 698cf7854 -> f3832a9a6


AMBARI-3715. Reassign Master Wizard does not display folder and hosts on "Manual commands"
page after browser reopening. (alexantonenko)


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

Branch: refs/heads/trunk
Commit: f3832a9a658806c9a36c32878f5866f05346acef
Parents: 698cf78
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Thu Nov 7 20:18:34 2013 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Thu Nov 7 20:18:34 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/models/cluster_states.js           | 2 ++
 ambari-web/app/routes/add_host_routes.js          | 5 -----
 ambari-web/app/routes/add_service_routes.js       | 5 -----
 ambari-web/app/routes/high_availability_routes.js | 2 --
 ambari-web/app/routes/reassign_master_routes.js   | 5 ++---
 ambari-web/app/routes/rollbackHA_routes.js        | 2 --
 ambari-web/app/utils/db.js                        | 9 +++++++--
 7 files changed, 11 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f3832a9a/ambari-web/app/models/cluster_states.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/cluster_states.js b/ambari-web/app/models/cluster_states.js
index 806518d..0ab9c43 100644
--- a/ambari-web/app/models/cluster_states.js
+++ b/ambari-web/app/models/cluster_states.js
@@ -79,6 +79,8 @@ App.clusterStatus = Ember.Object.create({
             }
             if (newValue.localdb) {
               this.set('localdb', newValue.localdb);
+              App.db.data = newValue.localdb;
+              App.db.setLocalStorage();
             }
           } else {
             // default status already set

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f3832a9a/ambari-web/app/routes/add_host_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_host_routes.js b/ambari-web/app/routes/add_host_routes.js
index f793d32..026882a 100644
--- a/ambari-web/app/routes/add_host_routes.js
+++ b/ambari-web/app/routes/add_host_routes.js
@@ -49,23 +49,18 @@ module.exports = Em.Route.extend({
           this.fitHeight();
         }
       });
-      App.clusterStatus.updateFromServer();
       var currentClusterStatus = App.clusterStatus.get('value');
-
       if (currentClusterStatus) {
         switch (currentClusterStatus.clusterState) {
           case 'ADD_HOSTS_DEPLOY_PREP_2' :
             addHostController.setCurrentStep('4');
-            App.db.data = currentClusterStatus.localdb;
             break;
           case 'ADD_HOSTS_INSTALLING_3' :
           case 'SERVICE_STARTING_3' :
             addHostController.setCurrentStep('5');
-            App.db.data = currentClusterStatus.localdb;
             break;
           case 'ADD_HOSTS_INSTALLED_4' :
             addHostController.setCurrentStep('6');
-            App.db.data = currentClusterStatus.localdb;
             break;
           default:
             break;

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f3832a9a/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index 6c51356..3bb75c7 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -54,23 +54,18 @@ module.exports = Em.Route.extend({
           }
         });
         addServiceController.set('popup',popup);
-        App.clusterStatus.updateFromServer();
         var currentClusterStatus = App.clusterStatus.get('value');
-
         if (currentClusterStatus) {
           switch (currentClusterStatus.clusterState) {
             case 'ADD_SERVICES_DEPLOY_PREP_2' :
               addServiceController.setCurrentStep('5');
-              App.db.data = currentClusterStatus.localdb;
               break;
             case 'ADD_SERVICES_INSTALLING_3' :
             case 'SERVICE_STARTING_3' :
               addServiceController.setCurrentStep('6');
-              App.db.data = currentClusterStatus.localdb;
               break;
             case 'ADD_SERVICES_INSTALLED_4' :
               addServiceController.setCurrentStep('7');
-              App.db.data = currentClusterStatus.localdb;
               break;
             default:
               break;

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f3832a9a/ambari-web/app/routes/high_availability_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/high_availability_routes.js b/ambari-web/app/routes/high_availability_routes.js
index 992c256..2994351 100644
--- a/ambari-web/app/routes/high_availability_routes.js
+++ b/ambari-web/app/routes/high_availability_routes.js
@@ -84,12 +84,10 @@ module.exports = Em.Route.extend({
         }
       });
       highAvailabilityWizardController.set('popup', popup);
-      App.clusterStatus.updateFromServer();
       var currentClusterStatus = App.clusterStatus.get('value');
       if (currentClusterStatus) {
         switch (currentClusterStatus.clusterState) {
           case 'HIGH_AVAILABILITY_DEPLOY' :
-            App.db.data = currentClusterStatus.localdb;
             highAvailabilityWizardController.setCurrentStep(currentClusterStatus.localdb.HighAvailabilityWizard.currentStep);
             break;
           default:

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f3832a9a/ambari-web/app/routes/reassign_master_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/reassign_master_routes.js b/ambari-web/app/routes/reassign_master_routes.js
index ffb217f..404b98a 100644
--- a/ambari-web/app/routes/reassign_master_routes.js
+++ b/ambari-web/app/routes/reassign_master_routes.js
@@ -70,10 +70,9 @@ module.exports = Em.Route.extend({
         }
       });
       reassignMasterController.set('popup', popup);
-      App.clusterStatus.updateFromServer();
-      var currentClusterStatus = App.clusterStatus.get('value');
-      App.db.data = currentClusterStatus.localdb;
       reassignMasterController.loadSecurityEnabled();
+      reassignMasterController.loadComponentToReassign();
+      var currentClusterStatus = App.clusterStatus.get('value');
       if (currentClusterStatus) {
         switch (currentClusterStatus.clusterState) {
           case 'REASSIGN_MASTER_INSTALLING' :

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f3832a9a/ambari-web/app/routes/rollbackHA_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/rollbackHA_routes.js b/ambari-web/app/routes/rollbackHA_routes.js
index 823681b..7f2fe0a 100644
--- a/ambari-web/app/routes/rollbackHA_routes.js
+++ b/ambari-web/app/routes/rollbackHA_routes.js
@@ -54,12 +54,10 @@ module.exports = Em.Route.extend({
         }
       });
       rollbackHighAvailabilityWizardController.set('popup', popup);
-      App.clusterStatus.updateFromServer();
       var currentClusterStatus = App.clusterStatus.get('value');
       if (currentClusterStatus) {
         switch (currentClusterStatus.clusterState) {
           case 'ROLLBACK_HIGH_AVAILABILITY' :
-            App.db.data = currentClusterStatus.localdb;
             rollbackHighAvailabilityWizardController.setCurrentStep(currentClusterStatus.localdb.RollbackHighAvailabilityWizard.currentStep);
             break;
           default:

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f3832a9a/ambari-web/app/utils/db.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index f223e6b..c34d4de 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -309,12 +309,17 @@ App.db.setConfigs = function (configs) {
  */
 App.db.setWizardCurrentStep = function (wizardType, currentStep) {
   console.log('TRACE: Entering db:setWizardCurrentStep function');
-
   App.db.data[wizardType.capitalize()].currentStep = currentStep;
-
   localStorage.setObject('ambari', App.db.data);
 };
 
+/**
+ * Set localStorage with data from server
+ */
+App.db.setLocalStorage = function () {
+  localStorage.setObject('ambari', App.db.data);
+}
+
 App.db.setSecurityWizardStatus = function (status) {
   App.db.data = localStorage.getObject('ambari');
   if (!App.db.data.AddSecurity) {


Mime
View raw message