Bug 736848 - links to autogroups and links to cluster groups are invalid in numerous places in the GUI
links to autogroups and links to cluster groups are invalid in numerous place...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.1
Unspecified Unspecified
high Severity high (vote)
: ---
: ---
Assigned To: Ian Springer
Mike Foley
:
Depends On: rhq41-ui
Blocks: rhq42
  Show dependency treegraph
 
Reported: 2011-09-08 16:54 EDT by Ian Springer
Modified: 2013-08-05 20:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:24:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
proposed-patch (39.17 KB, patch)
2011-10-03 08:42 EDT, Lukas Krejci
no flags Details | Diff

  None (edit)
Description Ian Springer 2011-09-08 16:54:34 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)
Comment 1 Ian Springer 2011-09-08 17:23:34 EDT
[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:

getResourceGroupLink
getGroupPluginConfigurationUpdateHistoryLink
getGroupResourceConfigurationUpdateHistoryLink
getGroupOperationHistoryLink
getGroupEventHistoryListLink
getGroupMonitoringGraphsLink
Comment 2 Lukas Krejci 2011-10-03 08:42:02 EDT
Created attachment 526056 [details]
proposed-patch

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.
Comment 3 Ian Springer 2011-10-03 12:17:51 EDT
Lukas, the patch looks good to me - applied (master 651d673).
Comment 4 Mike Foley 2011-10-04 10:25:37 EDT
verified through regression testing around compat groups, autogroups,
Comment 5 Mike Foley 2012-02-07 14:24:41 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

Note You need to log in before you can comment on or make changes to this bug.