Skip to content

Commit 35bb3ec

Browse files
Merge pull request #15754 from jhadvig/OCPBUGS-65883
OCPBUGS-65883: Add missing sample for a ConsoleLink with mailto
2 parents c6881d1 + c6dff48 commit 35bb3ec

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

frontend/packages/console-shared/src/utils/sample-utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ const defaultSamples = (t: TFunction) =>
209209
id: 'cl-namespace-dashboard',
210210
targetResource: getTargetResource(ConsoleLinkModel),
211211
},
212+
{
213+
title: t('console-shared~Add a link to the contact mail'),
214+
description: t(
215+
'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.',
216+
),
217+
id: 'cl-contact-mail',
218+
targetResource: getTargetResource(ConsoleLinkModel),
219+
},
212220
],
213221
)
214222
.setIn(

frontend/public/locales/en/console-shared.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@
295295
"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.",
296296
"Add a link to the namespace dashboard": "Add a link to the namespace dashboard",
297297
"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.",
298+
"Add a link to the contact mail": "Add a link to the contact mail",
299+
"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.",
298300
"Add catalog categories": "Add catalog categories",
299301
"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.",
300302
"Add project access roles": "Add project access roles",

frontend/public/models/yaml-templates.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,19 @@ spec:
934934
namespaceDashboard:
935935
namespaces:
936936
- default
937+
`,
938+
)
939+
.setIn(
940+
[referenceForModel(k8sModels.ConsoleLinkModel), 'cl-contact-mail'],
941+
`
942+
apiVersion: console.openshift.io/v1
943+
kind: ConsoleLink
944+
metadata:
945+
name: example-contact-mail
946+
spec:
947+
href: 'mailto:[email protected]'
948+
location: UserMenu
949+
text: Contact Mail Link
937950
`,
938951
)
939952
.setIn(

0 commit comments

Comments
 (0)