Pārlūkot izejas kodu

AMBARI-12058. Add Service Wizard. After page refresh on step 7, 8 all left-menu items are available for a while (alexantonenko)

Alex Antonenko 10 gadi atpakaļ
vecāks
revīzija
564948ff51

+ 1 - 1
ambari-web/app/controllers/main/service/add_controller.js

@@ -252,7 +252,7 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs, {
   loadMasterComponentHosts: function () {
     this._super();
     this.set('content.skipMasterStep', App.StackService.find().filterProperty('isSelected').filterProperty('hasMaster').everyProperty('isInstalled', true));
-    this.get('isStepDisabled').findProperty('step', 2).set('value', this.get('content.skipMasterStep'));
+    this.get('isStepDisabled').findProperty('step', 2).set('value', this.get('content.skipMasterStep') || (this.get('currentStep') == 7 || this.get('currentStep') == 8));
   },
 
   /**

+ 4 - 4
ambari-web/app/routes/add_service_routes.js

@@ -331,13 +331,13 @@ module.exports = App.WizardRoute.extend({
       console.log('in addService.step6:connectOutlets');
       var controller = router.get('addServiceController');
       controller.setCurrentStep('7');
+      if (!App.get('testMode')) {              //if test mode is ON don't disable prior steps link.
+        controller.setLowerStepsDisable(7);
+      }
       controller.dataLoading().done(function () {
         controller.loadAllPriorSteps().done(function () {
           var wizardStep9Controller = router.get('wizardStep9Controller');
           wizardStep9Controller.set('wizardController', controller);
-          if (!App.get('testMode')) {              //if test mode is ON don't disable prior steps link.
-            controller.setLowerStepsDisable(7);
-          }
           controller.connectOutlet('wizardStep9', controller.get('content'));
         });
       });
@@ -380,9 +380,9 @@ module.exports = App.WizardRoute.extend({
       console.log('in addService.step7:connectOutlets');
       var controller = router.get('addServiceController');
       controller.setCurrentStep('8');
+      controller.setLowerStepsDisable(8);
       controller.dataLoading().done(function () {
         controller.loadAllPriorSteps().done(function () {
-          controller.setLowerStepsDisable(8);
           controller.connectOutlet('wizardStep10', controller.get('content'));
         });
       });