Skip to content

Commit a753b26

Browse files
author
Romain Jamet
committed
feat(okms): add changelog buttons
ref: #MANAGER-19653 Signed-off-by: Romain Jamet <[email protected]>
1 parent 23aaee8 commit a753b26

File tree

13 files changed

+63
-19
lines changed

13 files changed

+63
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from 'react';
2+
import {
3+
ChangelogButton,
4+
ChangelogLinks,
5+
} from '@ovh-ux/manager-react-components';
6+
7+
const kmsChangelogLinks: ChangelogLinks = {
8+
changelog:
9+
'https://github.com/orgs/ovh/projects/16/views/6?sliceBy%5Bvalue%5D=Key+Management+Service',
10+
roadmap:
11+
'https://github.com/orgs/ovh/projects/16/views/1?sliceBy%5Bvalue%5D=Key+Management+Service',
12+
'feature-request':
13+
'https://github.com/ovh/management-security-operations-roadmap/issues/new',
14+
};
15+
16+
export const KmsChangelogButton = () => {
17+
return <ChangelogButton links={kmsChangelogLinks} />;
18+
};
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
import { ChangelogLinks } from '@ovh-ux/manager-react-components';
2-
3-
export const CHANGELOG_LINKS: ChangelogLinks = {
4-
changelog:
5-
'https://github.com/orgs/ovh/projects/16/views/6?sliceBy%5Bvalue%5D=KMS',
6-
roadmap:
7-
'https://github.com/orgs/ovh/projects/16/views/1?sliceBy%5Bvalue%5D=KMS&pane=info',
8-
'feature-request':
9-
'https://github.com/ovh/management-security-operations-roadmap/issues/new',
10-
};
11-
121
export const SERVICE_KEYS_LABEL = 'Service Keys';
132
export const URN_LABEL = 'URN';
143
export const PATH_LABEL = 'Path';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from 'react';
2+
import {
3+
ChangelogButton,
4+
ChangelogLinks,
5+
} from '@ovh-ux/manager-react-components';
6+
7+
const secretMangerLinks: ChangelogLinks = {
8+
changelog:
9+
'https://github.com/orgs/ovh/projects/16/views/6?sliceBy%5Bvalue%5D=Secret+Manager',
10+
roadmap:
11+
'https://github.com/orgs/ovh/projects/16/views/1?sliceBy%5Bvalue%5D=Secret+Manager',
12+
'feature-request':
13+
'https://github.com/ovh/management-security-operations-roadmap/issues/new',
14+
};
15+
16+
export const SecretManagerChangelogButton = () => {
17+
return <ChangelogButton links={secretMangerLinks} />;
18+
};

packages/manager/apps/key-management-service/src/modules/secret-manager/pages/create/Create.page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { BaseLayout, Notifications } from '@ovh-ux/manager-react-components';
44
import { useTranslation } from 'react-i18next';
55
import { OdsBreadcrumb } from '@ovhcloud/ods-components/react';
66
import { RootBreadcrumbItem } from '@secret-manager/components/breadcrumb';
7+
import { SecretManagerChangelogButton } from '@secret-manager/components/secretManagerChangelogButton/SecretManagerChangelogButton.component';
78
import { DomainManagement } from './DomainManagement.component';
89
import { SecretForm } from './SecretForm.component';
910
import { OrderOkmsModalProvider } from '@/common/pages/OrderOkmsModal/OrderOkmsModalContext';
@@ -18,7 +19,10 @@ export default function SecretCreatePage() {
1819
return (
1920
<OrderOkmsModalProvider>
2021
<BaseLayout
21-
header={{ title: t('create_a_secret') }}
22+
header={{
23+
title: t('create_a_secret'),
24+
changelogButton: <SecretManagerChangelogButton />,
25+
}}
2226
breadcrumb={
2327
<OdsBreadcrumb>
2428
<RootBreadcrumbItem />

packages/manager/apps/key-management-service/src/modules/secret-manager/pages/dashboard/Dashboard.page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
RootBreadcrumbItem,
2222
SecretBreadcrumbItem,
2323
} from '@secret-manager/components/breadcrumb';
24+
import { SecretManagerChangelogButton } from '@secret-manager/components/secretManagerChangelogButton/SecretManagerChangelogButton.component';
2425
import { decodeSecretPath } from '@/modules/secret-manager/utils/secretPath';
2526
import Loading from '@/components/Loading/Loading';
2627
import {
@@ -63,6 +64,7 @@ export default function SecretDashboardPage() {
6364

6465
const headerProps: HeadersProps = {
6566
title: secretPathDecoded,
67+
changelogButton: <SecretManagerChangelogButton />,
6668
};
6769

6870
if (isSecretPending) {

packages/manager/apps/key-management-service/src/modules/secret-manager/pages/domains/Domains.page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
import { filterDomainsByRegion } from '@secret-manager/utils/domains';
1616
import { RegionSelector } from '@secret-manager/components/regionSelector/RegionSelector.component';
1717
import { RootBreadcrumbItem } from '@secret-manager/components/breadcrumb';
18+
import { SecretManagerChangelogButton } from '@secret-manager/components/secretManagerChangelogButton/SecretManagerChangelogButton.component';
1819
import { KMS_ROUTES_URLS } from '@/routes/routes.constants';
1920
import { OkmsDatagrid } from '@/common/components/okmsDatagrid/OkmsDatagrid.component';
2021
import { useOkmsDatagridList } from '@/data/hooks/useOkms';
@@ -75,6 +76,7 @@ export default function SecretDomainsPage() {
7576
<BaseLayout
7677
header={{
7778
title: t('domains_list'),
79+
changelogButton: <SecretManagerChangelogButton />,
7880
}}
7981
breadcrumb={
8082
<OdsBreadcrumb>

packages/manager/apps/key-management-service/src/modules/secret-manager/pages/listing/Listing.page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
import { useSecretList } from '@secret-manager/data/hooks/useSecretList';
2525
import { RegionSelector } from '@secret-manager/components/regionSelector/RegionSelector.component';
2626
import { useBackToDomainListUrl } from '@secret-manager/hooks/useBackToDomainListUrl';
27+
import { SecretManagerChangelogButton } from '@secret-manager/components/secretManagerChangelogButton/SecretManagerChangelogButton.component';
2728
import {
2829
DatagridAction,
2930
DatagridCellPath,
@@ -90,7 +91,10 @@ export default function SecretListingPage() {
9091

9192
return (
9293
<BaseLayout
93-
header={{ title: t('secret_manager') }}
94+
header={{
95+
title: t('secret_manager'),
96+
changelogButton: <SecretManagerChangelogButton />,
97+
}}
9498
breadcrumb={
9599
<OdsBreadcrumb>
96100
<RootBreadcrumbItem />

packages/manager/apps/key-management-service/src/pages/credential/Credential.page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
} from '@ovh-ux/manager-react-components';
2121
import { queryClient } from '@ovh-ux/manager-react-core-application';
2222
import { OdsTabs, OdsTab } from '@ovhcloud/ods-components/react';
23+
import { KmsChangelogButton } from '@/components/kmsChangelogButton/KmsChangelogButton.component';
2324
import {
2425
getOkmsCredentialQueryKey,
2526
useOkmsCredentialById,
@@ -108,6 +109,7 @@ const CredentialDashboard = () => {
108109
header={{
109110
title: credential.name || credential.id,
110111
headerButton: <KmsGuidesHeader />,
112+
changelogButton: <KmsChangelogButton />,
111113
}}
112114
backLinkLabel={t(
113115
'key_management_service_credential_dashboard_backlink',

packages/manager/apps/key-management-service/src/pages/credential/create/CreateCredential.page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import CreateGeneralInformations from '@/pages/credential/create/CreateGeneralIn
1919
import CreateAddIdentities from '@/pages/credential/create/CreateAddIdentities.component';
2020
import CreateCredentialConfirmation from '@/pages/credential/create/confirmation/CreateCredentialConfirmation.component';
2121
import { CertificateType, OkmsCredential } from '@/types/okmsCredential.type';
22+
import { KmsChangelogButton } from '@/components/kmsChangelogButton/KmsChangelogButton.component';
2223

2324
const CreateCredential = () => {
2425
const navigate = useNavigate();
@@ -100,6 +101,7 @@ const CreateCredential = () => {
100101
title: t('key_management_service_credential_create_title'),
101102
description: t('key_management_service_credential_create_subtitle'),
102103
headerButton: <KmsGuidesHeader />,
104+
changelogButton: <KmsChangelogButton />,
103105
}}
104106
message={<Notifications />}
105107
>

packages/manager/apps/key-management-service/src/pages/dashboard/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
BaseLayout,
77
HeadersProps,
88
ErrorBanner,
9-
ChangelogButton,
109
useFeatureAvailability,
1110
useServiceDetails,
1211
} from '@ovh-ux/manager-react-components';
@@ -19,12 +18,13 @@ import { KMS_ROUTES_URIS, KMS_ROUTES_URLS } from '@/routes/routes.constants';
1918
import { BreadcrumbItem } from '@/hooks/breadcrumb/useBreadcrumb';
2019
import { okmsQueryKeys } from '@/data/api/okms';
2120
import { useOkmsById } from '@/data/hooks/useOkms';
22-
import { CHANGELOG_LINKS, SERVICE_KEYS_LABEL } from '@/constants';
21+
import { SERVICE_KEYS_LABEL } from '@/constants';
2322
import KmsTabs, {
2423
KmsTabProps,
2524
} from '@/components/layout-helpers/Dashboard/KmsTabs';
2625
import { KMS_FEATURES } from '@/utils/feature-availability/feature-availability.constants';
2726
import { KmsDashboardOutletContext } from './KmsDashboard.type';
27+
import { KmsChangelogButton } from '@/components/kmsChangelogButton/KmsChangelogButton.component';
2828

2929
export default function DashboardPage() {
3030
const { t } = useTranslation([
@@ -150,7 +150,7 @@ export default function DashboardPage() {
150150
const headerProps: HeadersProps = {
151151
title: displayName,
152152
headerButton: <KmsGuidesHeader />,
153-
changelogButton: <ChangelogButton links={CHANGELOG_LINKS} />,
153+
changelogButton: <KmsChangelogButton />,
154154
};
155155

156156
const contextValue: KmsDashboardOutletContext = {

0 commit comments

Comments
 (0)