From c6dff48600a352a4a7d66f7db1befbac6a4196de Mon Sep 17 00:00:00 2001 From: Jakub Hadvig Date: Fri, 21 Nov 2025 14:27:43 +0100 Subject: [PATCH] OCPBUGS-65883: Add missing sample for a ConsoleLink with mailto --- .../console-shared/src/utils/sample-utils.ts | 8 ++++++++ frontend/public/locales/en/console-shared.json | 2 ++ frontend/public/models/yaml-templates.ts | 13 +++++++++++++ 3 files changed, 23 insertions(+) diff --git a/frontend/packages/console-shared/src/utils/sample-utils.ts b/frontend/packages/console-shared/src/utils/sample-utils.ts index 8465bd3ccd3..7891929364d 100644 --- a/frontend/packages/console-shared/src/utils/sample-utils.ts +++ b/frontend/packages/console-shared/src/utils/sample-utils.ts @@ -209,6 +209,14 @@ const defaultSamples = (t: TFunction) => id: 'cl-namespace-dashboard', targetResource: getTargetResource(ConsoleLinkModel), }, + { + title: t('console-shared~Add a link to the contact mail'), + description: t( + 'console-shared~The contact mail link appears in the user menu below the username. The link will open the default email client with the email address filled in.', + ), + id: 'cl-contact-mail', + targetResource: getTargetResource(ConsoleLinkModel), + }, ], ) .setIn( diff --git a/frontend/public/locales/en/console-shared.json b/frontend/public/locales/en/console-shared.json index a7b570e3dbc..735b171e3a6 100644 --- a/frontend/public/locales/en/console-shared.json +++ b/frontend/public/locales/en/console-shared.json @@ -295,6 +295,8 @@ "The application menu appears in the masthead below the 9x9 grid icon. Application menu links can include an optional image and section heading.": "The application menu appears in the masthead below the 9x9 grid icon. Application menu links can include an optional image and section heading.", "Add a link to the namespace dashboard": "Add a link to the namespace dashboard", "Namespace dashboard links appear on the project dashboard and namespace details pages in a section called \"Launcher\". Namespace dashboard links can optionally be restricted to a specific namespace or namespaces.": "Namespace dashboard links appear on the project dashboard and namespace details pages in a section called \"Launcher\". Namespace dashboard links can optionally be restricted to a specific namespace or namespaces.", + "Add a link to the contact mail": "Add a link to the contact mail", + "The contact mail link appears in the user menu below the username. The link will open the default email client with the email address filled in.": "The contact mail link appears in the user menu below the username. The link will open the default email client with the email address filled in.", "Add catalog categories": "Add catalog categories", "Provides a list of default categories which are shown in the Software Catalog. The categories must be added below customization developerCatalog.": "Provides a list of default categories which are shown in the Software Catalog. The categories must be added below customization developerCatalog.", "Add project access roles": "Add project access roles", diff --git a/frontend/public/models/yaml-templates.ts b/frontend/public/models/yaml-templates.ts index 855ab85dce0..dce5a640650 100644 --- a/frontend/public/models/yaml-templates.ts +++ b/frontend/public/models/yaml-templates.ts @@ -921,6 +921,19 @@ spec: namespaceDashboard: namespaces: - default +`, + ) + .setIn( + [referenceForModel(k8sModels.ConsoleLinkModel), 'cl-contact-mail'], + ` +apiVersion: console.openshift.io/v1 +kind: ConsoleLink +metadata: + name: example-contact-mail +spec: + href: 'mailto:support@example.com' + location: UserMenu + text: Contact Mail Link `, ) .setIn(