You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2017/10/17 14:58:35 UTC
[19/50] ambari git commit: AMBARI-22207. [Intermittent] While moving
master, a manual commands wizard came in between (alexantonenko)
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/68df85d4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/68df85d4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/68df85d4
Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 68df85d402b047c54f9d0324e7f94b970c5282ee
Parents: be605cb
Author: Alex Antonenko <aa...@hortonworks.com>
Authored: Thu Oct 12 15:53:00 2017 +0300
Committer: Alex Antonenko <aa...@hortonworks.com>
Committed: Thu Oct 12 15:53:00 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/68df85d4/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/68df85d4/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 84a56f1..c9577f8 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1195,7 +1195,7 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A
}
},
- 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/68df85d4/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 1f6a393..a6e42af 100644
--- a/ambari-web/app/templates/main/service/reassign/step3.hbs
+++ b/ambari-web/app/templates/main/service/reassign/step3.hbs
@@ -64,8 +64,8 @@
</div>
<div class="wizard-footer col-md-12">
<div class="btn-area">
- <a class="btn btn-default pull-left" {{action back href="true"}}>← {{t common.back}}</a>
- <a class="btn btn-success pull-right"
- id="spinner" {{bindAttr disabled="controller.isSubmitDisabled"}} {{action submit target="controller"}}>{{t common.deploy}} →</a>
+ <button class="btn pull-left" {{action back href="true"}}>← {{t common.back}}</button>
+ <button class="btn btn-success pull-right"
+ id="spinner" {{bindAttr disabled="controller.isSubmitDisabled"}} {{action submit target="controller"}}>{{t common.deploy}} →</button>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/68df85d4/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