You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/03/03 23:01:43 UTC

ambari git commit: AMBARI-9906. Confirm hosts: next button does not enable (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 56a4bed7b -> b8a2af664


AMBARI-9906. Confirm hosts: next button does not enable (alexantonenko)


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

Branch: refs/heads/branch-2.0.0
Commit: b8a2af664a44d57ae5665f36786dba97739f2c05
Parents: 56a4bed
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Mar 4 00:03:23 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Mar 4 02:01:38 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step3_controller.js | 14 +++++++++++---
 ambari-web/app/templates/wizard/step3.hbs             |  2 +-
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b8a2af66/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index b07391a..796438d 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -71,6 +71,14 @@ App.WizardStep3Controller = Em.Controller.extend({
   isRetryDisabled: true,
 
   /**
+   * Is Back button disabled
+   * @return {bool}
+   */
+  isBackDisabled: function () {
+    return this.get('isRegistrationInProgress') || !this.get('isWarningsLoaded');
+  }.property('isRegistrationInProgress', 'isWarningsLoaded'),
+
+  /**
    * @type {bool}
    */
   isLoaded: false,
@@ -457,11 +465,11 @@ App.WizardStep3Controller = Em.Controller.extend({
   disablePreviousSteps: function () {
     App.router.get('installerController.isStepDisabled').filter(function (step) {
       return step.step >= 0 && step.step <= 2;
-    }).setEach('value', this.get('isRegistrationInProgress'));
-    if (this.get('isRegistrationInProgress')) {
+    }).setEach('value', this.get('isBackDisabled'));
+    if (this.get('isBackDisabled')) {
       this.set('isSubmitDisabled', true);
     }
-  }.observes('isRegistrationInProgress'),
+  }.observes('isBackDisabled'),
 
   /**
    * Do bootstrap calls

http://git-wip-us.apache.org/repos/asf/ambari/blob/b8a2af66/ambari-web/app/templates/wizard/step3.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step3.hbs b/ambari-web/app/templates/wizard/step3.hbs
index 2d5c9ea..cb75709 100644
--- a/ambari-web/app/templates/wizard/step3.hbs
+++ b/ambari-web/app/templates/wizard/step3.hbs
@@ -147,7 +147,7 @@
     {{/unless}}
   </div>
   <div class="btn-area">
-    <button class="btn pull-left installer-back-btn" {{bindAttr disabled="isRegistrationInProgress"}} {{action back}}>&larr; {{t common.back}}</button>
+    <button class="btn pull-left installer-back-btn" {{bindAttr disabled="isBackDisabled"}} {{action back}}>&larr; {{t common.back}}</button>
     <button class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}>{{t common.next}} &rarr;</button>
   </div>
 </div>
\ No newline at end of file