فهرست منبع

AMBARI-1960. Back button can be pressed while host registration is taking process, even though the button seems disabled. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1469154 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 سال پیش
والد
کامیت
77d872fa43

+ 3 - 0
CHANGES.txt

@@ -749,6 +749,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1960. "Back" button can be pressed while host registration is taking
+ process, even though the button seems disabled. (yusaku)
+
  AMBARI-1959. Cannot login to Ambari after login failure. (yusaku)
 
  AMBARI-1957. Hosts table: whether the alert filter is in effect or not is

+ 7 - 0
ambari-web/app/controllers/wizard/step3_controller.js

@@ -948,6 +948,13 @@ App.WizardStep3Controller = Em.Controller.extend({
     if (this.parseHostInfo(mockHosts, selectedHosts)) {
       // this.saveHostInfoToDb();
     }
+  },
+
+  back: function () {
+    if (this.get('isInstallInProgress')) {
+      return false;
+    }
+    App.router.send('back');
   }
 
 });

+ 2 - 5
ambari-web/app/routes/add_host_routes.js

@@ -128,11 +128,8 @@ module.exports = Em.Route.extend({
         controller.connectOutlet('wizardStep3', controller.get('content'));
       })
     },
-    back: function(router, event){
-      //if install not in progress
-      if(!event.contexts[0].get("isInstallInProgress")){
-        router.transitionTo('step1');
-      }
+    back: function(router){
+      router.transitionTo('step1');
     },
     exit: function (router) {
       router.get('wizardStep3Controller').set('stopBootstrap', true);

+ 1 - 4
ambari-web/app/routes/installer.js

@@ -149,11 +149,8 @@ module.exports = Em.Route.extend({
       controller.loadAllPriorSteps();
       controller.connectOutlet('wizardStep3', controller.get('content'));
     },
-    back: function(router, event){
-      //if install not in progress
-      if(!$(event.target).attr('disabled')){
+    back: function(router){
         router.transitionTo('step2');
-      }
     },
     next: function (router, context) {
       var installerController = router.get('installerController');

+ 1 - 1
ambari-web/app/templates/wizard/step3.hbs

@@ -138,7 +138,7 @@
       {{/if}}
     {{/if}}
   <div class="btn-area">
-    <a class="btn pull-left" {{bindAttr disabled="isInstallInProgress"}} {{action back controller}}>&larr; {{t common.back}}</a>
+    <a class="btn pull-left" {{bindAttr disabled="isInstallInProgress"}} {{action back target="controller"}}>&larr; {{t common.back}}</a>
     <a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}>{{t common.next}} &rarr;</a>
   </div>
 </div>