Red Hat Bugzilla – Bug 736848
links to autogroups and links to cluster groups are invalid in numerous places in the GUI
Last modified: 2013-08-05 20:40:58 EDT
There are three different types of compat groups: regular compat groups, autogroups, and cluster groups. Each of these types has a different form of view path for its detail view:
- regular groups: #ResourceGroup/<groupId>
- autogroups: #Resource/AutoGroup/<groupId>
- cluster groups: #ResourceGroup/AutoCluster/<groupId>
For the most part, the same view classes are used for the group views for the three different types. Many of these group views use the various LinkManager.getGroupXxxLink(int groupId) methods (e.g. getGroupEventHistoryListLink()) to build links to other sub views within the same group. Unfortunately, these methods, which are passed a groupId, assume the groupId is for a regular group, so they will return invalid links if the groupId actually is for an autogroup or cluster group. The methods which are passed either a ResourceGroup or a (group) EntityContext should be used instead of the methods which are passed a groupId, because these methods have enough context to determine what type of group it is and will return the correct form of URL. Examples of the good methods are:
- getResourceGroupTabLink(ResourceGroup group, String tabName, String subTabName)
- getEntityTabLink(EntityContext entityContext, String tabName, String subTabName)
[master 70a43d5] adds a new method to LinkManager that can return the appropriate form of group URL given an EntityContext, and updates several spots in the code to start using this new method to ensure the correct form of URL is used for the different types of compat groups. However, there are still a bunch of other spots in the code that need to be fixed; we need to do a find usages of the following LinkManager methods and replace the usages with the good methods listed in my previous comment:
Created attachment 526056 [details]
This is a proposed patch for the usages of those methods.
I didn't replace all the usages of the getResourceGroupLink() as there are places where nothing else but an actual group can be used (bundles for example).
Also, I'm not too familiar with the GWT GUI so I'm just attaching a patch here so that more experienced devs can take a look at it.
Lukas, the patch looks good to me - applied (master 651d673).
verified through regression testing around compat groups, autogroups,
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE