Bug 1342231 - Cloud providers security groups back button redirects me to network manager
Summary: Cloud providers security groups back button redirects me to network manager
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.7.0
Assignee: Harpreet Kataria
QA Contact: Matouš Mojžíš
URL:
Whiteboard: ui
Depends On:
Blocks: 1355787
TreeView+ depends on / blocked
 
Reported: 2016-06-02 17:26 UTC by Matouš Mojžíš
Modified: 2018-04-10 12:06 UTC (History)
10 users (show)

Fixed In Version: 5.7.0.0
Doc Type: Known Issue
Doc Text:
Clone Of:
: 1355787 (view as bug list)
Environment:
Last Closed: 2017-01-11 19:53:39 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Matouš Mojžíš 2016-06-02 17:26:53 UTC
Description of problem:
When I go from provider summary page to security groups and then click on back button I am redirected to that provider's network manager summary page instead of provider's summary page.

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

How reproducible:
Always

Steps to Reproduce:
1. Add a cloud provider
2. Go to Compute -> Clouds -> Provider and select a provider
3. On summary page click on security groups and then click on back button

Actual results:
It redirects me on network manager summary page

Expected results:
It should redirect me back to provider summary page

Additional info:

Comment 2 Harpreet Kataria 2016-06-02 18:58:20 UTC
Aparna,

Can you look into this one, Link to "Security Groups" in the relationships box on Cloud provider summary is being built incorrectly. Not sure if this has anything to do with restful routes but seems like for all other links code goes inside if block https://github.com/ManageIQ/manageiq/blob/master/app/helpers/textual_summary_helper.rb#L120 but for security groups it goes to the else branch.

Link being built is "/ems_network/show/10000000000104?display=security_groups"

correct link should be "/ems_cloud/show/10000000000104?display=security_groups" similar to others in the relationships box.

Let me know if we need to discuss.

Thanks,
~Harpreet

Comment 3 Greg Blomquist 2016-06-02 19:16:42 UTC
Ladas, can you look at this?  Look at the line of code Harpreet is pointing to in comment #2.

If there's nothing you can do from the backend, send it back over to Harpreet to take look.  But, I suspect this is something to do with the back end in some way.

Comment 4 Harpreet Kataria 2016-06-02 19:33:16 UTC
Ladas,

for some reason owner for collection of security_groups is getting set to EmsNetwork which doesn't seem right to me, whereas it gets correctly set to EmsCloud for other relationship links.
https://github.com/ManageIQ/manageiq/blob/master/app/helpers/textual_summary_helper.rb#L117

~Harpreet

Comment 5 Ladislav Smola 2016-06-03 08:00:01 UTC
Hm, ok so it doesn't expect that the relation in the textual_summary will point to another Manager.

@Harpreet could you please check if the logic of the back button can be changed? If it takes the manager of the collection by hard, there is not much we can do, I guess.

If you will not find any easy fix, please assign it to me, in a long run, I will fix this by rewriting Google to have Network Manager, then all clouds will have a network manager and I can remove the link to security groups from here. But this fix can't be backported, cause it will be tooo huge.

Comment 6 Ladislav Smola 2016-06-03 08:03:32 UTC
Just a quick explanation of the comment 4, yes the security groups belong to NetworkManager, for all providers except Google, so that is why the link is also kept under Cloud.

Comment 7 Harpreet Kataria 2016-06-03 15:13:56 UTC
Ladas, 

The problem is the back button, the link to "Security Groups" from provider summary itself brings user to incorrect screen, it should load the screen with Security Groups that belong to a selected Cloud Provider whereas with current implementation it renders the screen with Security Groups for a EMS Network which is not a correct behavior. Incorrect link is leading to show the incorrect back button.

We can change UI code that builds the links to act differently when building links for Security Groups, but this might be affecting any of the summary screens that have links to Security Groups. So i think we should fix the root cause instead of adding nasty code around to build links differently.

Let me know how you want to approach this.

Thanks,
~Harpreet

Comment 8 Ladislav Smola 2016-06-03 15:41:14 UTC
So main problem is, that the back button is really 'go to parent manager of this collection' button. So not sure, if we can make it truly 'back button'. 

Maybe we should just rename it? 

Or we will strictly keep the relationship links only under their parent managers?

Comment 12 CFME Bot 2016-07-11 20:16:24 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/15d12ff24b47184151b80d7b6e7fe190ddfa236c

commit 15d12ff24b47184151b80d7b6e7fe190ddfa236c
Author:     Harpreet Kataria <hkataria>
AuthorDate: Fri Jul 8 17:21:00 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Jul 8 17:21:00 2016 -0400

    Fixed the way link to Security Groups is being built for Cloud Provider
    
    Fixed the way link to Security Groups is being built on a Cloud Provider summary screen, existing way of building link to list of Security Groups builds a link to security groups that belong to cloud network, when clicking on the link it jumps to cloud network controller and no longer is in ems_cloud control which makes back button on summary screen to point to cloud network summary screen instead of ems_cloud summary screen.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1342231

 app/helpers/ems_cloud_helper/textual_summary.rb       | 9 ++++++++-
 spec/helpers/ems_cloud_helper/textual_summary_spec.rb | 5 +++++
 2 files changed, 13 insertions(+), 1 deletion(-)

Comment 14 Matouš Mojžíš 2016-09-30 14:12:57 UTC
Verified in 5.7.0.3. There is no back button under security groups.

Comment 17 Matouš Mojžíš 2018-04-10 12:06:58 UTC
One time issue. Setting qe_test_coverage flag to -.


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