Bug 2090895 - Dynamic plugin nav extension "startsWith" property does not work
Summary: Dynamic plugin nav extension "startsWith" property does not work
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.11
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.11.0
Assignee: Andrew Ballantyne
QA Contact: Yadan Pei
Depends On:
TreeView+ depends on / blocked
Reported: 2022-05-26 20:31 UTC by Jon Jackson
Modified: 2022-08-10 11:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-08-10 11:14:36 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 11660 0 None open Bug 2090895: Support startsWith Nav Extension property 2022-06-07 14:27:44 UTC
Red Hat Issue Tracker CONSOLE-3151 0 None None None 2022-05-26 20:52:21 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:15:00 UTC

Description Jon Jackson 2022-05-26 20:31:07 UTC
Description of problem:
Dynamic plugin nav extensions do not support `startsWith` property

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

How reproducible:

Steps to Reproduce:
1. Edit the console-app console-extensions.json and add a startsWith property to one of the nav items. (e.g. "startsWith": ["starts-with"])
2. In the console, navigate to a URL that should match (e.g. /k8s/cluster/starts-with)

Actual results:
The nav item will not be highlighted as active in the console

Expected results:
The nav item should be highlighted as active when the URL starts with any of the items in the startsWith property.

Additional info:

Comment 2 Yadan Pei 2022-06-21 06:51:15 UTC
$ git diff dynamic-demo-plugin/console-extensions.json
diff --git a/dynamic-demo-plugin/console-extensions.json b/dynamic-demo-plugin/console-extensions.json
index 57ce393b66..00ce7db27f 100644
--- a/dynamic-demo-plugin/console-extensions.json
+++ b/dynamic-demo-plugin/console-extensions.json
@@ -164,7 +164,8 @@
       "perspective": "admin",
       "section": "admin-demo-section",
       "name": "%plugin__console-demo-plugin~Test Consumer%",
-      "href": "/test-consumer"
+      "href": "/test-consumer",
+      "startsWith": ["consumer-starts", "consumer-prefix"]
@@ -215,7 +216,8 @@
       "perspective": "admin",
       "section": "admin-demo-section",
       "name": "%plugin__console-demo-plugin~Test Utilities%",
-      "href": "/test-utility-consumer"
+      "href": "/test-utility-consumer",
+      "startsWith": ["utility-starts", "utility-prefix"]

visit URL /utility-prefix or /consumer-starts, then 'Test Utilities' or 'Test Consumers' menu will be highlighted

verified on 4.11.0-0.nightly-2022-06-20-220209

Comment 4 errata-xmlrpc 2022-08-10 11:14:36 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 (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.


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