Bug 1470998

Summary: "Open link in new tab" in right click menu jumps to home page
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED ERRATA QA Contact: XiaochuanWang <xiaocwan>
Severity: low Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, jokerman, mmccomas, rhamilto
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:08:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xingxing Xia 2017-07-14 08:52:53 UTC
Description of problem:
For some links, "Open link in new tab" in right click menu jumps to home page. But left click returns correct destination page.

Version-Release number of selected component (if applicable):
openshift v3.6.144

How reproducible:
Always

Steps to Reproduce:
1. Create pods
$ oc new-app --file=https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json
2. In overview page, left click the donut of database pod (note: don't expand the app item first. Same below)
3. In overview page, right click the donut of database pod, click "Open link in new tab"

Actual results:
2. Go to the pod page for database pod
3. Go to home page "https://master/console/"

Expected results:
3. Should go to correct destination page as step 2

Additional info:

Comment 1 Robb Hamilton 2018-01-03 19:52:16 UTC
This bug also exists on the Monitoring page as the mini donut wrapped by an anchor element is used there as well.  The bug occurs because the mini donut markup has an href attribute with an empty value in addition to an ng-click that does the right-click navigating.  I noticed we do not include an href attribute on the full-size donut, so it does not have this bug.  It seems like we should be consistent between the two different sized donuts.

Comment 2 Robb Hamilton 2018-01-03 19:54:07 UTC
s/right-click/left-click

Comment 3 Jessica Forrester 2018-01-03 20:49:52 UTC
summarizing discussion we had in person:
- We should update all of the pod donuts on the overview to be linking to a valid URL
- We need to stop going to the pods list filtered by label selector, since there are cases now where that list can actually be incorrect (i.e. it can include pods the controller doesnt actually own)
- We should go to the controller's page instead and scroll to the pods table
- Pod donuts on the controller page should probably no longer be clickable or should just jump to the pods table at the bottom of the page
- A single pod should still go directly to that pod's page since people are use to this behavior as a shortcut (it was a specifically requested shortcut)
- In general, when we have links that are for navigation we need to be using URLs, if we have links that are not for navigation they should not be <a> tags but should be <button> instead. If we want them to look like links we can use the btn-link class.  This approach is the correct semantic tag usage as far as accessibility is concerned, and eliminates this issue where right-click -> open in new tab and ctrl(cmd)+click do not do the right thing.

Comment 4 Robb Hamilton 2018-03-20 13:08:20 UTC
PR to resolve: https://github.com/openshift/origin-web-console/pull/2900

Comment 6 Xingxing Xia 2018-05-16 07:58:24 UTC
Verified in OpenShift Web Console v3.10.0-0.46.0. Now right click of database pod donut jumps to pod page, right click of frontend pods donut jumps to rc page

Comment 8 errata-xmlrpc 2018-07-30 19:08:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1816