Bug 772259

Summary: All resource-level and group-level tabs are always visible
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: Core UIAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2CC: hrupp
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-01 19:22:53 UTC Type: ---
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: 694221    

Description John Sanda 2012-01-06 16:00:07 UTC
Description of problem:
In the feature/gwt-ugprade branch, when you drill down to a particular resource, all of the subsystem/facet tabs are visible regardless of whether or not the resource type supports each facet. For example, when I go to view an agent, the Drift tab appears even though the agent resource type does not support drift. And when I go to view a platform resource, I see the configuration tab even though the platform resource type does not support resource configuration. 

I am seeing this at the group level as well. I have a compatible group of platforms, and I see the configuration tab for the group.

I observed this in Firefox 3.6.17.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2012-01-06 20:44:49 UTC
The root of the problem is in TwoLevelTabSet.java in the setTabHidden method. SmartGWT does not offer the ability to hide a tab out of the box; so, this method has logic to do just that. When setTabHidden is called, the Tab objects is removed from its TabSet. The Tab is cached in a map so that it can later be made visible again without having to completely rebuild it. Before the tab is removed, we obtain a reference to the Canvas that corresponds to the tabs pane property which holds the actual content of the tab. After the tab is removed from the TabSet, the pane property is reset. Resetting the pane property is causing all tabs to always appear.

Comment 2 John Sanda 2012-01-06 22:14:48 UTC
Fix has been pushed to the feature/gwt-upgrade branch. In setTabHidden, when the tab is hidden, we no longer reset the pane property. Instead we cache the pane along with the hidden tab. When the tab is made visible again, we then reset the pane property.

commit hash: 419f3637d95562d1d6d90edb97ae73a7f0c6bf6c

Comment 3 John Sanda 2012-02-17 16:46:01 UTC
This commit has been merged into master.

Comment 4 John Sanda 2012-02-20 18:01:03 UTC
Moving back to ON_DEV because I have determined that this bug fix caused the regression discussed in bug 781602 (https://bugzilla.redhat.com/show_bug.cgi?id=781602#c1).

Comment 5 John Sanda 2012-02-20 19:30:30 UTC
The regression has been fixed and the code for hiding a tab has been simplified by making use of the destroyPanes property. Setting it to false results in the content pane not being destroyed when a tab is removed from its tab set.

master commit hash: f54f4ed03d76d21ab73d9075dc21a81e9fdf21bc

Comment 6 Heiko W. Rupp 2013-09-01 19:22:53 UTC
Bulk closing of BZs that have no target version set, but which are ON_QA for more than a year and thus are in production for a long time.