ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-22207. [Intermittent] While moving master, a manual commands wizard came in between (alexantonenko)
Date Wed, 11 Oct 2017 18:08:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 8c766070a -> 804ed4e6b


AMBARI-22207. [Intermittent] While moving master, a manual commands wizard came in between
(alexantonenko)


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

Branch: refs/heads/branch-2.6
Commit: 804ed4e6b8947dd843eb5931260470e6ee77f05d
Parents: 8c76607
Author: Alex Antonenko <aantonenko@hortonworks.com>
Authored: Wed Oct 11 21:08:41 2017 +0300
Committer: Alex Antonenko <aantonenko@hortonworks.com>
Committed: Wed Oct 11 21:08:41 2017 +0300

----------------------------------------------------------------------
 .../main/service/reassign/step3_controller.js     | 18 ++++++++++++++----
 .../app/mixins/wizard/assign_master_components.js |  2 +-
 .../app/templates/main/service/reassign/step3.hbs |  6 +++---
 .../wizard/assign_master_components_test.js       |  2 +-
 4 files changed, 19 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/804ed4e6/ambari-web/app/controllers/main/service/reassign/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step3_controller.js b/ambari-web/app/controllers/main/service/reassign/step3_controller.js
index c44c4f3..4898b75 100644
--- a/ambari-web/app/controllers/main/service/reassign/step3_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step3_controller.js
@@ -268,9 +268,16 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({
 
   propertiesToChange: {},
 
-  isSubmitDisabled: Em.computed.and('wizardController.isComponentWithReconfiguration', '!isLoaded'),
+  isSubmitDisabled: Em.computed.or('!isLoaded', 'submitButtonClicked'),
+
+  /**
+   * Is Submit-click processing now
+   * @type {bool}
+   */
+  submitButtonClicked: false,
 
   loadStep: function () {
+    this.set('submitButtonClicked', false);
     if (this.get('wizardController.isComponentWithReconfiguration')) {
       this.set('isLoaded', false);
       App.ajax.send({
@@ -695,8 +702,11 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({
   },
 
   submit: function() {
-    App.get('router.mainAdminKerberosController').getKDCSessionState(function() {
-      App.router.send("next");
-    });
+    if (!this.get('submitButtonClicked')) {
+      this.set('submitButtonClicked', true);
+      App.get('router.mainAdminKerberosController').getKDCSessionState(function() {
+        App.router.send("next");
+      });
+    }
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/804ed4e6/ambari-web/app/mixins/wizard/assign_master_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js
index d84399e..f003fb4 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1229,7 +1229,7 @@ App.AssignMasterComponents = Em.Mixin.create({
     }
   },
 
-  nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress'),
+  nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress',
'!isLoaded'),
 
   /**
    * Submit button click handler

http://git-wip-us.apache.org/repos/asf/ambari/blob/804ed4e6/ambari-web/app/templates/main/service/reassign/step3.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/reassign/step3.hbs b/ambari-web/app/templates/main/service/reassign/step3.hbs
index 1b9c8ff..1a201ce 100644
--- a/ambari-web/app/templates/main/service/reassign/step3.hbs
+++ b/ambari-web/app/templates/main/service/reassign/step3.hbs
@@ -59,7 +59,7 @@
   {{/if}}
 {{/if}}
 <div class="btn-area">
-  <a class="btn pull-left" {{action back href="true"}}>&larr; {{t common.back}}</a>
-  <a class="btn btn-success pull-right"
-     id="spinner" {{bindAttr disabled="controller.isSubmitDisabled"}} {{action submit target="controller"}}>{{t
common.deploy}} &rarr;</a>
+  <button class="btn pull-left" {{action back href="true"}}>&larr; {{t common.back}}</button>
+  <button class="btn btn-success pull-right"
+     id="spinner" {{bindAttr disabled="controller.isSubmitDisabled"}} {{action submit target="controller"}}>{{t
common.deploy}} &rarr;</button>
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/804ed4e6/ambari-web/test/mixins/wizard/assign_master_components_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mixins/wizard/assign_master_components_test.js b/ambari-web/test/mixins/wizard/assign_master_components_test.js
index 635143c..20efb8e 100644
--- a/ambari-web/test/mixins/wizard/assign_master_components_test.js
+++ b/ambari-web/test/mixins/wizard/assign_master_components_test.js
@@ -211,6 +211,6 @@ describe('App.AssignMasterComponents', function () {
   });
 
   App.TestAliases.testAsComputedOr(baseObject.create(),
-    'nextButtonDisabled', ['App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress']);
+    'nextButtonDisabled', ['App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress',
'!isLoaded']);
 
 });
\ No newline at end of file


Mime
View raw message