Skip to content

Commit ad31228

Browse files
author
Marc Monchablon
committed
feat(iam): add 'Roadmap & Changelog' links in tag-manager
ref: #MAIAM-43 Signed-off-by: Marc Monchablon <[email protected]>
1 parent f89d413 commit ad31228

File tree

6 files changed

+43
-4
lines changed

6 files changed

+43
-4
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { ChangelogLinks } from '@ovh-ux/manager-react-components';
2+
3+
export const CHANGELOG_LINKS: ChangelogLinks = {
4+
roadmap:
5+
'https://github.com/orgs/ovh/projects/16/views/1?sliceBy%5Bvalue%5D=Identity+and+Access+Management+%28IAM%29',
6+
changelog:
7+
'https://github.com/orgs/ovh/projects/16/views/6?sliceBy%5Bvalue%5D=Identity+and+Access+Management+%28IAM%29',
8+
'feature-request':
9+
'https://github.com/ovh/management-security-operations-roadmap/issues/new/choose',
10+
};
11+
12+
export const CHANGELOG_CHAPTERS = [
13+
'identity-security-operation',
14+
'identity-access-management',
15+
'identity-access-management',
16+
];

packages/manager/apps/identity-access-management/src/pages/tagManager/TagManager.page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,23 @@ import React from 'react';
22
import { useTranslation } from 'react-i18next';
33
import {
44
BaseLayout,
5+
ChangelogButton,
56
HeadersProps,
67
Notifications,
78
} from '@ovh-ux/manager-react-components';
89
import TagsListDatagrid from './components/tagsListDatagrid/TagsListDatagrid.component';
910
import { TagManagerContextProvider } from './TagManagerContext';
11+
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';
1012

1113
export default function TagManager() {
1214
const { t } = useTranslation('tag-manager');
1315

1416
const header: HeadersProps = {
1517
title: t('title'),
1618
description: t('description'),
19+
changelogButton: (
20+
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
21+
),
1722
};
1823

1924
return (

packages/manager/apps/identity-access-management/src/pages/tagManager/TagManager.spec.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// import React from 'react';
22
import '@testing-library/jest-dom';
33
import { describe, it, vi } from 'vitest';
4-
import { OdsCheckbox } from '@ovhcloud/ods-components/react';
4+
import { screen } from '@testing-library/react';
55
import { renderTestApp } from '@/test-utils/renderTestApp';
66

77
vi.mock('@ovh-ux/manager-react-components', async (importOriginal) => ({
@@ -25,4 +25,9 @@ describe('Tag Manager page', () => {
2525
it('displays Tag manager', async () => {
2626
await renderTestApp();
2727
});
28+
29+
it('displays changelog button', async () => {
30+
const { container } = await renderTestApp();
31+
expect(container).toContainHTML('Roadmap & Changelog');
32+
});
2833
});

packages/manager/apps/identity-access-management/src/pages/tagManager/assignTag/AssignTag.page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import { useTranslation } from 'react-i18next';
33
import {
44
BaseLayout,
5+
ChangelogButton,
56
Notifications,
67
RedirectionGuard,
78
} from '@ovh-ux/manager-react-components';
@@ -19,6 +20,7 @@ import ResourcesListDatagrid from '@/components/resourcesDatagrid/ResourcesDatag
1920
import { ResourcesDatagridContextProvider } from '@/components/resourcesDatagrid/ResourcesDatagridContext';
2021
import AssignTagTopbar from './components/AssignTagTopbar.component';
2122
import { Breadcrumb } from '@/components/breadcrumb/Breadcrumb.component';
23+
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';
2224

2325
export default function AssignTag() {
2426
const { t } = useTranslation('tag-manager');
@@ -27,6 +29,9 @@ export default function AssignTag() {
2729

2830
const header = {
2931
title: t('assignMultipleToResources'),
32+
changelogButton: (
33+
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
34+
),
3035
};
3136

3237
return (

packages/manager/apps/identity-access-management/src/pages/tagManager/tagDetail/TagDetail.page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import { useTranslation } from 'react-i18next';
33
import {
44
BaseLayout,
5+
ChangelogButton,
56
Notifications,
67
RedirectionGuard,
78
} from '@ovh-ux/manager-react-components';
@@ -18,16 +19,18 @@ import TagDetailTopbar from './components/TagDetailTopbar.component';
1819
import { tagTofilter } from '@/utils/formatFiltersForApi';
1920
import { Breadcrumb } from '@/components/breadcrumb/Breadcrumb.component';
2021
import TagDetailActions from './components/TagDetailActions.component';
22+
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';
2123

2224
export default function TagDetail() {
2325
const { tag } = useParams();
2426
const navigate = useNavigate();
2527
const { t } = useTranslation('tag-manager');
2628

2729
const header = {
28-
title: t('tagDetailTitle', {
29-
tag,
30-
}),
30+
title: t('tagDetailTitle', { tag }),
31+
changelogButton: (
32+
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
33+
),
3134
};
3235

3336
return (

packages/manager/apps/identity-access-management/src/pages/tagManager/tagDetailAssign/TagDetailAssign.page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import { useTranslation } from 'react-i18next';
33
import {
44
BaseLayout,
5+
ChangelogButton,
56
Notifications,
67
RedirectionGuard,
78
} from '@ovh-ux/manager-react-components';
@@ -15,6 +16,7 @@ import ResourcesListDatagrid from '@/components/resourcesDatagrid/ResourcesDatag
1516
import { ResourcesDatagridContextProvider } from '@/components/resourcesDatagrid/ResourcesDatagridContext';
1617
import AssignTagTopbar from '../assignTag/components/AssignTagTopbar.component';
1718
import { Breadcrumb } from '@/components/breadcrumb/Breadcrumb.component';
19+
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';
1820

1921
export default function TagDetailAssign() {
2022
const { t } = useTranslation('tag-manager');
@@ -23,6 +25,9 @@ export default function TagDetailAssign() {
2325

2426
const header = {
2527
title: t('assignTagToResources', { tag }),
28+
changelogButton: (
29+
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
30+
),
2631
};
2732

2833
const onSuccessUrl = urls.tagDetail.replace(':tag', tag);

0 commit comments

Comments
 (0)