Bug 1090476

Summary: While checking "Find Agent" and there is no agent available common location makes action buttons are disabled for a while
Product: [Other] RHQ Project Reporter: Jeeva Kandasamy <jkandasa>
Component: Core UIAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.11CC: hrupp, mazz
Target Milestone: GA   
Target Release: RHQ 4.11   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-21 10:14:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1070242    
Attachments:
Description Flags
Buttons are disabled none

Description Jeeva Kandasamy 2014-04-23 12:23:50 UTC
Created attachment 888882 [details]
Buttons are disabled

Description of problem:
While checking "Find Agent" and there is no agent available in common locations, makes action buttons are disabled for a while

Version-Release number of selected component (if applicable):
Version : 4.11.0-SNAPSHOT
Build Number : 1bc9904
GWT Version : 2.5.0
SmartGWT Version : 3.0

Browser: Firefox 28

How reproducible:
always

Steps to Reproduce:
1. Navigate to "Administration-->Agents-->New"
2. Enter remote box details (Agent should not be installed), keep blank "Agent Installation Path"
3. Click "Find Agent" button
4. Throws "Could not find an agent installed when looking in common locations" and buttons are disabled

Actual results:
buttons are disabled for a while

Expected results:
Should not block buttons

Additional info: screen shot is attached

Comment 1 John Mazzitelli 2014-04-23 15:53:12 UTC
Do the buttons re-enable? If they do, this is working as expected.

What this is doing while the buttons are disabled for a while is it is actually looking for an agent. It is running a "find" and scanning all the directories that are common for an agent to be located (e.g. "/opt", "/rhq", etc). We tell "find" to search subdirectories at most 4 levels deep. So it could take a while to scan all the locations. While it is scanning, we don't want the user to press any of the buttons - we want the user to wait for it to find the agent, if one is to be found.

Is there something else that is a problem here? If all the issue is that the buttons are disabled while the search for an agent is going on, I think we should close this as working-as-expected.

Comment 2 Jeeva Kandasamy 2014-04-24 09:17:47 UTC
Yes, it is getting re-enable after a while. I got the pop-up "Could not find an agent installed when looking in common locations", I clicked ok, but still it takes a some time to re-enable the buttons after clicked "ok" also

In this case, until we will get the info from back-end server, we might show graphical icon like loading, user might understand some communication is happening back-end. Currently page looks like static.

This will be applicable for the buttons,
"Fine Agent", "Update Status" and "Install Agent".

Comment 3 Heiko W. Rupp 2014-04-24 10:06:12 UTC
I agree that visual indicators about progress are good, as this gives the user feedback that something is happening.
Otherwise the user may think the UI just hangs and restarts it.

Comment 4 John Mazzitelli 2014-04-28 19:44:20 UTC
If the "Find Agent" didn't find the agent, the old was was still checking for status, which is why the buttons remained disabled for a time even after the error message popped up. Now, that status check is skipped if the agent can't be found. Hopefully, that makes it more responsive. You no longer see the greyed out buttons even after the error.

git commit to master: 8a087da

Comment 5 Heiko W. Rupp 2014-07-21 10:14:09 UTC
Bulk closing of RHQ 4.11 issues, now that RHQ 4.12 is out.

If you find an issue with those, please open a new BZ, linking to the old one.