-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51677/
-----------------------------------------------------------
(Updated Sept. 6, 2016, 10:41 p.m.)
Review request for Ambari, Alexandr Antonenko and Di Li.
Bugs: AMBARI-18327
https://issues.apache.org/jira/browse/AMBARI-18327
Repository: ambari
Description
-------
While installing a cluster if the Ambari user happened to click the "Next"
button of Step-4 (Choose Services step) more than once, then it could lead to
skipping directly to step-6 or 7 or 8 depending on the number of times the
click got registered. This behavior is reproducible only when the host is slow,
which would allow enough time to click the Next button multiple times.
This issue is related to AMBARI-14574, and is a revised fix for the Step-4.
Diffs
-----
ambari-web/app/controllers/wizard/step4_controller.js 04e6784
Diff: https://reviews.apache.org/r/51677/diff/
Testing (updated)
-------
**FIX:**
In step-4 the flag "nextBtnClickInProgress" was not set anywhere. So if a
timeout was manually added in the "submit" function of the controller, we could
allow multiple clicks to be registered and these would be processed allowing
steps to be skipped. In the revised fix, the flag "nextBtnClickInProgress" is
set in the "submit" function. "nextBtnClickInProgress" causes
"isSubmitDisabled" function also to return "true" or "false" depending on
whether it is "true" or "false" respectively. For this reason, we also need to
reset the "nextBtnClickInProgress" flag at the end of "validate" function so
that the subsequent valid "submit" calls, on closing pop-up(s) can be
processed.
**TESTING:**
ambari-web unit tests affter applying the patch:
30182 tests complete (46 seconds)
151 tests pending
Also, did manual testing by adding a timeout in the submit() of
step4_controller.js to allow multiple clicks to be registered on the Next
button.
Thanks,
Keta Patel