Bug 749801

Summary: Resource selector: once a resourcetype is selected in the type filter, there is no way to clear the type filter (i.e. specify no type)
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Core UIAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2CC: ccrouch, hrupp, jsanda
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-04 03:49:15 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 678340, 735475    

Description Ian Springer 2011-10-28 09:28:43 EDT

    
Comment 1 Mike Foley 2011-10-31 11:28:13 EDT
please add some details .... per BZ triage meeting 10/31/2011
Comment 2 Ian Springer 2011-10-31 12:11:12 EDT
1) Select a ResourceType (e.g. RHQ Agent) from the type filter pulldown menu.

2) Now try to deselect that type (i.e. clear the type filter). This does not appear to be possible without selecting some other type.
Comment 3 John Sanda 2012-02-27 15:05:48 EST
I have committed and pushed a fix.

master commit hash: 5b2151eeda854460260df8a4e195fb34167c9edc

What is seemingly an easy issue to fix, it turns out not be the case. The widget involved is IPickTreeItem, and it has the following behavior. Data is loaded lazily when you click on the widget. Initially the widget shows a single value which defaults to the string, "Choose a value". When you click the drop down, the plugin and resource type data is fetched from the server. Once you select a value, the initial, default value goes away, forcing you to select a plugin or resource type. After trying numerous approaches, I have not been successful in keeping the initial value in the list of possible selections. The solution I went with is to insert a blank row which facilitates allowing you to undo a previous selection. Selecting the blank row has the effect of undoing the previous selection in the type filter. 

This solution is somewhat consistent with the category filter because it also displays a blank row; however, the category filter does not display an initial prompt value like the type filter. I am not sure how much if at all this is a concern.
Comment 5 Heiko W. Rupp 2013-09-04 03:49:15 EDT
Bulk closing of some old issues