Repository: ambari Updated Branches: refs/heads/trunk 5ce202496 -> 16014374e
AMBARI-16432. Give user visual feedback while we do background request and next button is disabled (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/16014374 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/16014374 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/16014374 Branch: refs/heads/trunk Commit: 16014374ec3c8f33eee247f1bf7cf7455deea176 Parents: 5ce2024 Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Fri May 13 15:24:32 2016 +0300 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Fri May 13 17:07:58 2016 +0300 ---------------------------------------------------------------------- .../app/templates/common/assign_master_components.hbs | 10 ++++++---- ambari-web/app/templates/wizard/step4.hbs | 7 ++++++- ambari-web/app/templates/wizard/step6.hbs | 10 ++++++---- ambari-web/app/templates/wizard/step7.hbs | 11 ++++++----- .../main/service/reassign/step6_controller_test.js | 8 ++++---- 5 files changed, 28 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/16014374/ambari-web/app/templates/common/assign_master_components.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/assign_master_components.hbs b/ambari-web/app/templates/common/assign_master_components.hbs index dc05d74..893d1e6 100644 --- a/ambari-web/app/templates/common/assign_master_components.hbs +++ b/ambari-web/app/templates/common/assign_master_components.hbs @@ -141,9 +141,11 @@ {{#if view.isBackButtonVisible}} <a class="btn pull-left installer-back-btn" {{action back}}>← {{t common.back}}</a> {{/if}} - <a class="btn btn-success pull-right" {{bindAttr disabled="submitDisabled"}} {{action submit target="controller"}}>{{view.acceptButtonText}}</a> - {{#if App.router.nextBtnClickInProgress}} - {{view App.SpinnerView tagName="span" classNames="pull-right"}} - {{/if}} + <a class="btn btn-success pull-right" {{bindAttr disabled="submitDisabled"}} {{action submit target="controller"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{view.acceptButtonText}} + </a> </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/16014374/ambari-web/app/templates/wizard/step4.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step4.hbs b/ambari-web/app/templates/wizard/step4.hbs index 21c2aae..0d4d0e7 100644 --- a/ambari-web/app/templates/wizard/step4.hbs +++ b/ambari-web/app/templates/wizard/step4.hbs @@ -52,6 +52,11 @@ {{#unless view.parentView.controller.hideBackButton}} <a class="btn pull-left installer-back-btn" {{action back}}>← {{t common.back}}</a> {{/unless}} - <a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}> {{t common.next}} →</a> + <a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </a> </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/16014374/ambari-web/app/templates/wizard/step6.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step6.hbs b/ambari-web/app/templates/wizard/step6.hbs index 31d62f9..4ed5ace 100644 --- a/ambari-web/app/templates/wizard/step6.hbs +++ b/ambari-web/app/templates/wizard/step6.hbs @@ -95,9 +95,11 @@ </div> <div class="btn-area"> <a class="btn installer-back-btn" {{action back}}>← {{t common.back}}</a> - <a class="btn btn-success pull-right" {{bindAttr disabled="submitDisabled"}} {{action next}}>{{t common.next}} →</a> - {{#if App.router.nextBtnClickInProgress}} - {{view App.SpinnerView tagName="span" classNames="pull-right"}} - {{/if}} + <a class="btn btn-success pull-right" {{bindAttr disabled="submitDisabled"}} {{action next}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </a> </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/16014374/ambari-web/app/templates/wizard/step7.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step7.hbs b/ambari-web/app/templates/wizard/step7.hbs index c29fdc9..d43cc2c 100644 --- a/ambari-web/app/templates/wizard/step7.hbs +++ b/ambari-web/app/templates/wizard/step7.hbs @@ -36,11 +36,12 @@ {{#if App.supports.preInstallChecks}} <a class="btn" {{action runPreInstallChecks target="App.router.preInstallChecksController"}} {{bindAttr disabled="isSubmitDisabled"}}><i class="icon-exclamation"></i> {{t installer.step7.preInstallChecks}}</a> {{/if}} - {{#if App.router.nextBtnClickInProgress}} - {{view App.SpinnerView tagName="span"}} - {{/if}} - <a class="btn btn-success" {{bindAttr disabled="isSubmitDisabled"}} - {{action submit target="controller"}}>{{t common.next}} →</a> + <a class="btn btn-success" {{bindAttr disabled="isSubmitDisabled"}} {{action submit target="controller"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </a> </div> </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/16014374/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js index f5029a8..d155c01 100644 --- a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js +++ b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js @@ -174,9 +174,9 @@ describe('App.ReassignMasterWizardStep6Controller', function () { hostComponentStub.restore(); }); - var setUpHosts = function (pxfHosts, dataNodeHosts) { - hostComponentStub.withArgs('componentName', 'PXF').returns(pxfHosts); - hostComponentStub.withArgs('componentName', 'DATANODE').returns(dataNodeHosts); + var setUpHosts = function (_pxfHosts, _dataNodeHosts) { + hostComponentStub.withArgs('componentName', 'PXF').returns(_pxfHosts); + hostComponentStub.withArgs('componentName', 'DATANODE').returns(_dataNodeHosts); }; it('does not delete PXF from source host if PXF and DATANODE are not installed on the source host', function () { @@ -228,7 +228,7 @@ describe('App.ReassignMasterWizardStep6Controller', function () { setUpHosts(pxfHosts, []); controller.loadStep(); - expect(controller.get('commands').indexOf('installPxf')).to.eql(4); + expect(controller.get('commands').indexOf('installPxf')).to.be.equal(4); }); });