1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/creating-custom-links.adoc
2023-10-30 10:13:25 -04:00

88 lines
2.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * web_console/customizing-the-web-console.adoc
:_mod-docs-content-type: PROCEDURE
[id="creating-custom-links_{context}"]
= Creating custom links in the web console
.Prerequisites
* You must have administrator privileges.
.Procedure
. From *Administration* -> *Custom Resource Definitions*, click on
*ConsoleLink*.
. Select *Instances* tab
. Click *Create Console Link* and edit the file:
+
[source,yaml]
----
apiVersion: console.openshift.io/v1
kind: ConsoleLink
metadata:
name: example
spec:
href: 'https://www.example.com'
location: HelpMenu <1>
text: Link 1
----
<1> Valid location settings are `HelpMenu`, `UserMenu`, `ApplicationMenu`, and
`NamespaceDashboard`.
+
To make the custom link appear in all namespaces, follow this example:
+
[source,yaml]
----
apiVersion: console.openshift.io/v1
kind: ConsoleLink
metadata:
name: namespaced-dashboard-link-for-all-namespaces
spec:
href: 'https://www.example.com'
location: NamespaceDashboard
text: This appears in all namespaces
----
+
To make the custom link appear in only some namespaces, follow this example:
+
[source,yaml]
----
apiVersion: console.openshift.io/v1
kind: ConsoleLink
metadata:
name: namespaced-dashboard-for-some-namespaces
spec:
href: 'https://www.example.com'
location: NamespaceDashboard
# This text will appear in a box called "Launcher" under "namespace" or "project" in the web console
text: Custom Link Text
namespaceDashboard:
namespaces:
# for these specific namespaces
- my-namespace
- your-namespace
- other-namespace
----
+
To make the custom link appear in the application menu, follow this example:
+
[source,yaml]
----
apiVersion: console.openshift.io/v1
kind: ConsoleLink
metadata:
name: application-menu-link-1
spec:
href: 'https://www.example.com'
location: ApplicationMenu
text: Link 1
applicationMenu:
section: My New Section
# image that is 24x24 in size
imageURL: https://via.placeholder.com/24
----
. Click *Save* to apply your changes.