Bug 2083756
Summary: | Linkify not upgradeable message on ClusterSettings page | ||||||
---|---|---|---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Samuel Padgett <spadgett> | ||||
Component: | Management Console | Assignee: | Robb Hamilton <rhamilto> | ||||
Status: | CLOSED ERRATA | QA Contact: | Yanping Zhang <yanpzhan> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 4.11 | CC: | yapei | ||||
Target Milestone: | --- | ||||||
Target Release: | 4.11.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: |
Version: 4.11.0-0.nightly-2022-05-09-224745
Cluster ID: 48ab4c6c-f91a-4aeb-8c2c-ae89936076d7
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36
|
|||||
Last Closed: | 2022-08-10 11:11:01 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: | |||||||
Attachments: |
|
Description
Samuel Padgett
2022-05-10 17:27:44 UTC
The existing behavior is to pass the content to SyncMarkdownView (see https://github.com/openshift/console/blob/5aebdf4faa6e050e5c4db83095739f71a303d6ef/frontend/public/components/cluster-settings/cluster-settings.tsx#L950) as the content can contain markdown. I don't think SyncMarkdownView and Linkify are compatible? Hm, it looks like showdown has an auto link option we could try: https://github.com/showdownjs/showdown simplifiedAutoLink: (boolean) [default false] Turning this option on will enable automatic linking to urls. This means that: some text www.google.com will be parsed as <p>some text <a href="www.google.com">www.google.com</a> Although if the message is meant to be markdown, it would be better to include <> angle brackets around the URL in the message itself, then it should just work. Checked on ocp 4.11 cluster with payload 4.11.0-0.nightly-2022-05-17-060006. Steps to verify: 1.Construct fake message containing 3 types of links from clusteroperator for testing. $ cat <<EOF >co.yaml apiVersion: config.openshift.io/v1 kind: ClusterOperator metadata: name: testing spec: {} EOF $ oc apply -f co.yaml $ oc proxy & $ curl -k -XPATCH -H "Accept: application/json" -H "Content-Type: application/json-patch+json" 'http://127.0.0.1:8001/apis/config.openshift.io/v1/clusteroperators/testing/status' -d '[{"op": "add", "path": "/status", "value": {"conditions": [{"lastTransitionTime": "2021-06-01T01:01:01Z", "type": "Upgradeable", "status": "False", "reason": "Testing", "message": "The whatsits are broken.Pls refer to: 1. http://www.example.com 2. <http://www.example.com> 3. [http://www.baidu.com](http://www.baidu.com)"}]}}]' 2. Check on clustersettings details page. The 3 types of links could be shown and open correctly. Pls see screenshot. The bug is fixed. 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069 |