ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-10414. HA wizard page execute all operations repeatedly after ambari-server restart. (akovalenko)
Date Thu, 09 Apr 2015 15:41:43 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f41b8f235 -> 3171ad54c


AMBARI-10414. HA wizard page execute all operations repeatedly after ambari-server restart.
(akovalenko)


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

Branch: refs/heads/trunk
Commit: 3171ad54c3fe71890e547dbc24d1d30478bc6080
Parents: f41b8f2
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Thu Apr 9 18:15:39 2015 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Thu Apr 9 18:15:39 2015 +0300

----------------------------------------------------------------------
 .../app/routes/rm_high_availability_routes.js   | 46 +++++++++++---------
 1 file changed, 25 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3171ad54/ambari-web/app/routes/rm_high_availability_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/rm_high_availability_routes.js b/ambari-web/app/routes/rm_high_availability_routes.js
index e15ee13..f97ebd2 100644
--- a/ambari-web/app/routes/rm_high_availability_routes.js
+++ b/ambari-web/app/routes/rm_high_availability_routes.js
@@ -21,13 +21,11 @@ var App = require('app');
 module.exports = App.WizardRoute.extend({
   route: '/highAvailability/ResourceManager/enable',
 
-  enter: function (router,transition) {
+  enter: function (router, transition) {
     var rMHighAvailabilityWizardController = router.get('rMHighAvailabilityWizardController');
     rMHighAvailabilityWizardController.dataLoading().done(function () {
       //Set YARN as current service
       App.router.set('mainServiceItemController.content', App.Service.find().findProperty('serviceName',
'YARN'));
-    });
-    Em.run.next(function () {
       App.router.get('updateController').set('isWorking', false);
       var popup = App.ModalPopup.show({
         classNames: ['full-width-modal'],
@@ -41,8 +39,8 @@ module.exports = App.WizardRoute.extend({
 
         onClose: function () {
           var rMHighAvailabilityWizardController = router.get('rMHighAvailabilityWizardController'),
-            currStep = rMHighAvailabilityWizardController.get('currentStep'),
-            self = this;
+              currStep = rMHighAvailabilityWizardController.get('currentStep'),
+              self = this;
 
           if (parseInt(currStep) === 4) {
             App.showConfirmationPopup(function () {
@@ -52,11 +50,13 @@ module.exports = App.WizardRoute.extend({
                 clusterName: App.router.getClusterName(),
                 clusterState: 'DEFAULT',
                 localdb: App.db.data
-              }, {alwaysCallback: function () {
-                self.hide();
-                router.transitionTo('main.services.index');
-                location.reload();
-              }});
+              }, {
+                alwaysCallback: function () {
+                  self.hide();
+                  router.transitionTo('main.services.index');
+                  location.reload();
+                }
+              });
             }, Em.I18n.t('admin.rm_highAvailability.closePopup'));
           } else {
             router.get('updateController').set('isWorking', true);
@@ -65,11 +65,13 @@ module.exports = App.WizardRoute.extend({
               clusterName: App.router.getClusterName(),
               clusterState: 'DEFAULT',
               localdb: App.db.data
-            }, {alwaysCallback: function () {
-              self.hide();
-              router.transitionTo('main.services.index');
-              location.reload();
-            }});
+            }, {
+              alwaysCallback: function () {
+                self.hide();
+                router.transitionTo('main.services.index');
+                location.reload();
+              }
+            });
           }
         },
         didInsertElement: function () {
@@ -89,7 +91,9 @@ module.exports = App.WizardRoute.extend({
             break;
         }
       }
-      router.transitionTo('step' + rMHighAvailabilityWizardController.get('currentStep'));
+      Em.run.next(function () {
+        router.transitionTo('step' + rMHighAvailabilityWizardController.get('currentStep'));
+      });
     });
   },
 
@@ -97,8 +101,8 @@ module.exports = App.WizardRoute.extend({
     route: '/step1',
     connectOutlets: function (router) {
       var controller = router.get('rMHighAvailabilityWizardController');
-      controller.setCurrentStep('1');
       controller.dataLoading().done(function () {
+        controller.setCurrentStep('1');
         controller.connectOutlet('rMHighAvailabilityWizardStep1', controller.get('content'));
       })
     },
@@ -115,8 +119,8 @@ module.exports = App.WizardRoute.extend({
     route: '/step2',
     connectOutlets: function (router) {
       var controller = router.get('rMHighAvailabilityWizardController');
-      controller.setCurrentStep('2');
       controller.dataLoading().done(function () {
+        controller.setCurrentStep('2');
         controller.loadAllPriorSteps();
         controller.connectOutlet('rMHighAvailabilityWizardStep2', controller.get('content'));
       })
@@ -145,8 +149,8 @@ module.exports = App.WizardRoute.extend({
     route: '/step3',
     connectOutlets: function (router) {
       var controller = router.get('rMHighAvailabilityWizardController');
-      controller.setCurrentStep('3');
       controller.dataLoading().done(function () {
+        controller.setCurrentStep('3');
         controller.loadAllPriorSteps();
         controller.connectOutlet('rMHighAvailabilityWizardStep3', controller.get('content'));
       })
@@ -168,9 +172,9 @@ module.exports = App.WizardRoute.extend({
     route: '/step4',
     connectOutlets: function (router) {
       var controller = router.get('rMHighAvailabilityWizardController');
-      controller.setCurrentStep('4');
-      controller.setLowerStepsDisable(4);
       controller.dataLoading().done(function () {
+        controller.setCurrentStep('4');
+        controller.setLowerStepsDisable(4);
         controller.loadAllPriorSteps();
         controller.connectOutlet('rMHighAvailabilityWizardStep4', controller.get('content'));
       })


Mime
View raw message