Bug 1298890

Summary: 'Next' button does not change state until clicked on RHEV 2B. Engine and 2C. Hypervisors steps
Product: Red Hat Quickstart Cloud Installer Reporter: Antonin Pagac <apagac>
Component: WebUIAssignee: John Matthews <jmatthew>
Status: VERIFIED --- QA Contact: Dave Johnson <dajohnso>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.0CC: jmatthew, tcarlin, tsanders
Target Milestone: TP2Keywords: Triaged
Target Release: 1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
next enabled with error under the cell none

Description Antonin Pagac 2016-01-15 11:31:24 UTC
Description of problem:
When trying to change the hostname of the rhev engine and rhev hosts, the Next button does not change state in correspondence with the data entered.

In the 'Select a target machine for the engine:' table in the step 2B and also in the ' Select one or more target machines to be hypervisors.' table in the step 2C, when I choose a machine and delete the hostname, so that the cell is blank, there is a warning correctly displayed under the cell:

'invalid hostname'

which is correct, but the Next button stays blue and clickable, until the user clicks somewhere on the page or directly on the button. Then the button grays out. If clicked, the button just grays out, it does not do any action.

If the user wants to input a valid hostname into the empty cell, the situation is similar: there is no warning displayed under the cell, which is correct, but the Next button stays grayed-out until user clicks somewhere on the page, then the Next button changes state to blue and is clickable.

Version-Release number of selected component (if applicable):
RHCI-6.0-RHEL-7-20160114.t.0-RHCI-x86_64-dvd1.iso
Firefox 43.0.3

How reproducible:
Always

Steps to Reproduce:
1. Do a deployment of RHEVM, go to step 2B
2. Choose an engine machine, delete the hostname, leave the cell blank
3. Error appears under the cell but the Next button stays clickable until clicked.
4. See other behavior in description of the bug.

Actual results:
The Next button changes state only when clicked or when user clicks somewhere on the page

Expected results:
The Next button should change state in real time in according with the data user entered.

Additional info:

Comment 1 Erik Nelson 2016-01-19 21:38:46 UTC
Can reproduce this under specific circumstances. If you delete the hostname of the default selected engine after immediately loading the page, next is correctly disabled.

Repro:
- Navigate to 2B stage
- Delete default selected hostname
- Next should be disabled as expected
- Select another host
- Next should be enabled
- Reselect prior invalid host
- Next remains enabled

I reorganized the validation logic to address this. In the process of confirming this also applies to the hypervisors, although I suspect that may be a little more involved.

Comment 2 Erik Nelson 2016-01-20 21:49:03 UTC
Similar validation situation with the hypervisor selection:

Repro:
- Fresh page load
- Select 2 hosts, should default to good hostnames
- Confirm next enabled as expected
- Delete one hostname
- Confirm next disabled as expected
- Deselect invalid host
- Confirm next enabled as expected
- Select invalid host again
* - Next erroneously continues to be enabled; it should be disabled.

Submitting PR shortly to address both engine and hypervisor selection validation issues.

Comment 3 Erik Nelson 2016-01-21 14:55:56 UTC
PR: https://github.com/fusor/fusor/pull/647

Comment 4 John Matthews 2016-01-22 20:20:53 UTC
Compose of 1/22/16

Comment 5 Antonin Pagac 2016-01-26 09:20:38 UTC
I was able to reproduce this. The Next button was enabled and it took me to the next step even when I had host with empty (invalid) hostname selected. Attaching screenshot.

Version-Release number of selected component (if applicable):
RHCI-6.0-RHEL-7-20160122.t.1-RHCI-x86_64-dvd1.iso
Firefox 43.0.3

How reproducible:
Always

Steps to Reproduce:
1. Do a deployment of RHEVM, go to step 2B
2. I'm working with two machines to be used with RHEV.
2. Choose first machine, delete the hostname, leave the cell blank
4. Choose second machine, delete the hostname, leave the cell blank
5. Input valid hostname to the second machine
6. Choose the first machine
7. Error appears under the cell but the Next button is clickable and takes me to the next step

The Next button behaves as expected until the step number 6.

Comment 6 Antonin Pagac 2016-01-26 09:21:14 UTC
Created attachment 1118401 [details]
next enabled with error under the cell

Comment 7 Erik Nelson 2016-01-27 18:50:26 UTC
Good catch Antonin, this is caused by a validation race condition triggered by step 5 above. The *good* server response clobbers the invalid state set in 6.

This should be fixed by https://github.com/fusor/fusor/pull/655.

Comment 8 John Matthews 2016-01-28 17:53:44 UTC
Fixed in engineering compose of RHCI-6.0-RHEL-7-20160128.t.0-RHCI-x86_64-dvd1.iso

Comment 9 Antonin Pagac 2016-02-15 12:02:01 UTC
Verified.

TP2 RC9
RHCI-6.0-RHEL-7-20160208.1-RHCI-x86_64-dvd1.iso
RHCIOOO-7-RHEL-7-20160127.0-RHCIOOO-x86_64-dvd1.iso