Skip to content

Commit

Permalink
feat(pci-rancher): add additional guides links (#13595)
Browse files Browse the repository at this point in the history
ref: TAPC-675

Signed-off-by: Eric Ciccotti <[email protected]>
Co-authored-by: CDS Translator Agent <[email protected]>
  • Loading branch information
Eric-ciccotti and ovh-ux-cds authored Oct 31, 2024
1 parent 84b8d2e commit 2aea101
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
"guide3Description": "Wie Sie einen NAS über CIFS auf Windows Server mounten",
"guide3Link": "https://help.ovhcloud.com/csm/de-public-cloud-storage-nas-cifs?id=kb_article_view&amp;sysparm_article=KB0046663",
"managedRancherServiceGettingStartedTitle": "Erste Schritte mit Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Wie Sie Managed Rancher Service bei OVHcloud verwenden"
"managedRancherServiceGettingStartedTitleDescription": "Wie Sie Managed Rancher Service bei OVHcloud verwenden",
"managedRancherServiceGettingStartedTitle2": "Managed Rancher Service erstellen, aktualisieren und darauf zugreifen",
"managedRancherServiceGettingStartedTitleDescription2": "Hier erfahren Sie, wie Sie einen Managed Rancher Service erstellen, aktualisieren und darauf zugreifen",
"managedRancherServiceGettingStartedTitle3": "Den Lebenszyklus von Managed Rancher Service verstehen",
"managedRancherServiceGettingStartedTitleDescription3": "Entdecken Sie den Lebenszyklus von Rancher-Versionen bei Managed Rancher Service"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
"guide3Description": "Find out how to mount a NAS on Windows Server via CIFS",
"guide3Link": "https://help.ovhcloud.com/csm/en-gb-public-cloud-storage-nas-cifs?id=kb_article_view&amp;sysparm_article=KB0046664",
"managedRancherServiceGettingStartedTitle": "Getting started with the Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Find out how to use the Managed Rancher Service on OVHcloud"
"managedRancherServiceGettingStartedTitleDescription": "Find out how to use the Managed Rancher Service on OVHcloud",
"managedRancherServiceGettingStartedTitle2": "Create, update and access a Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription2": "Find out how to create, update and access a Managed Rancher Service",
"managedRancherServiceGettingStartedTitle3": "Understanding the Managed Rancher Service lifecycle",
"managedRancherServiceGettingStartedTitleDescription3": "Discover the Rancher version lifecycle on the Managed Rancher Service"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
"guide3Description": "Cómo montar un NAS en Windows Server a través del protocolo CIFS",
"guide3Link": "https://help.ovhcloud.com/csm/es-es-public-cloud-storage-nas-cifs?id=kb_article_view&amp;sysparm_article=KB0046668",
"managedRancherServiceGettingStartedTitle": "Empezar con Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Descubra cómo utilizar Managed Rancher Service en OVHcloud"
"managedRancherServiceGettingStartedTitleDescription": "Descubra cómo utilizar Managed Rancher Service en OVHcloud",
"managedRancherServiceGettingStartedTitle2": "Crear, actualizar y acceder a un Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription2": "Cómo crear, actualizar y acceder a un Managed Rancher Service",
"managedRancherServiceGettingStartedTitle3": "Descripción del Ciclo de Vida de Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription3": "Descubra el ciclo de vida de las versiones de Rancher en Managed Rancher Service"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"guideCategory": "Tutoriel",
"managedRancherServiceGettingStartedTitle": "Démarrer avec Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Découvrez comment utiliser Managed Rancher Service sur OVHcloud",
"managedRancherServiceGettingStartedTitle2": "Créer, mettre à jour et accéder à un Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription2": "Découvrez comment créer, mettre à jour, et accéder à un Managed Rancher Service",
"managedRancherServiceGettingStartedTitle3": "Comprendre le cycle de vie de Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription3": "Découvrez le cycle de vie des versions de Rancher sur Managed Rancher Service",
"guide2Title": "Monter votre NAS via un partage NFS",
"guide2Description": "Découvrez comment monter un NAS via un partage NFS",
"guide3Title": "Monter votre NAS sur Windows Server via CIFS",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"guideCategory": "Tutoriel",
"managedRancherServiceGettingStartedTitle": "Démarrer avec Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Découvrez comment utiliser Managed Rancher Service sur OVHcloud",
"managedRancherServiceGettingStartedTitle2": "Créer, mettre à jour et accéder à un Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription2": "Découvrez comment créer, mettre à jour, et accéder à un Managed Rancher Service",
"managedRancherServiceGettingStartedTitle3": "Comprendre le cycle de vie de Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription3": "Découvrez le cycle de vie des versions de Rancher sur Managed Rancher Service",
"guide2Title": "Monter votre NAS via un partage NFS",
"guide2Description": "Découvrez comment monter un NAS via un partage NFS",
"guide3Title": "Monter votre NAS sur Windows Server via CIFS",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
"guide3Description": "Come effettuare il mount di un NAS su Windows Server tramite il protocollo CIFS",
"guide3Link": "https://help.ovhcloud.com/csm/it-public-cloud-storage-nas-cifs?id=kb_article_view&amp;sysparm_article=KB0046671",
"managedRancherServiceGettingStartedTitle": "Iniziare a utilizzare Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Scopri come utilizzare Managed Rancher Service in OVHcloud"
"managedRancherServiceGettingStartedTitleDescription": "Scopri come utilizzare Managed Rancher Service in OVHcloud",
"managedRancherServiceGettingStartedTitle2": "Creare, aggiornare e accedere a un Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription2": "Scopri come creare, aggiornare e accedere a un Managed Rancher Service",
"managedRancherServiceGettingStartedTitle3": "Comprendere il ciclo di vita del servizio Managed Rancher",
"managedRancherServiceGettingStartedTitleDescription3": "Scopri il ciclo di vita delle versioni di Rancher sul servizio Managed Rancher"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
"guide3Description": "Dowiedz się, jak zamontować NAS na serwerze Windows Server przy użyciu protokołu CIFS",
"guide3Link": "https://help.ovhcloud.com/csm/pl-public-cloud-storage-nas-cifs?id=kb_article_view&amp;sysparm_article=KB0046679",
"managedRancherServiceGettingStartedTitle": "Zacznij korzystać z Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Dowiedz się, jak korzystać z Managed Rancher Service od OVHcloud"
"managedRancherServiceGettingStartedTitleDescription": "Dowiedz się, jak korzystać z Managed Rancher Service od OVHcloud",
"managedRancherServiceGettingStartedTitle2": "Tworzenie, aktualizowanie i uzyskiwanie dostępu do Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription2": "Dowiedz się, jak tworzyć, aktualizować i uzyskiwać dostęp do Managed Rancher Service",
"managedRancherServiceGettingStartedTitle3": "Zrozum cykl życia Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription3": "Sprawdź cykl życia wersji Rancher w Managed Rancher Service"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
"guide3Description": "Saiba como montar um NAS no Windows Server através do protocolo CIFS",
"guide3Link": "https://help.ovhcloud.com/csm/pt-public-cloud-storage-nas-cifs?id=kb_article_view&amp;sysparm_article=KB0046676",
"managedRancherServiceGettingStartedTitle": "Começar com o Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription": "Saiba como utilizar o Managed Rancher Service na OVHcloud"
"managedRancherServiceGettingStartedTitleDescription": "Saiba como utilizar o Managed Rancher Service na OVHcloud",
"managedRancherServiceGettingStartedTitle2": "Criar, atualizar e aceder a um Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription2": "Saiba como criar, atualizar e aceder a um Managed Rancher Service",
"managedRancherServiceGettingStartedTitle3": "Compreender o ciclo de vida do Managed Rancher Service",
"managedRancherServiceGettingStartedTitleDescription3": "Descubra o ciclo de vida das versões do Rancher no Managed Rancher Service"
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,100 @@ const GUIDE_LIST: { [guideName: string]: Partial<GuideLinks> } = {
WS:
'https://help.ovhcloud.com/csm/es-public-cloud-managed-rancher-service-getting-started?id=kb_article_view&sysparm_article=KB0061900',
},
MANAGED_RANCHER_SERVICE_CREATION: {
DEFAULT:
'https://help.ovhcloud.com/csm/en-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064191',
ASIA:
'https://help.ovhcloud.com/csm/asia-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064184',
AU:
'https://help.ovhcloud.com/csm/en-au-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064190',
CA:
'https://help.ovhcloud.com/csm/en-ca-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064197',
DE:
'https://help.ovhcloud.com/csm/de-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064194',
ES:
'https://help.ovhcloud.com/csm/es-es-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064193',
EU:
'https://help.ovhcloud.com/csm/en-ie-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064183',
FR:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064198',
GB:
'https://help.ovhcloud.com/csm/en-gb-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064189',
IE:
'https://help.ovhcloud.com/csm/en-ie-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064183',
IN:
'https://help.ovhcloud.com/csm/asia-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064184',
IT:
'https://help.ovhcloud.com/csm/it-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064195',
MA:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064198',
NL:
'https://help.ovhcloud.com/csm/en-nl-documentation-public-cloud?id=kb_browse_cat&kb_id=574a8325551974502d4c6e78b7421938',
PL:
'https://help.ovhcloud.com/csm/pl-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064187',
PT:
'https://help.ovhcloud.com/csm/pt-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064196',
QC:
'https://help.ovhcloud.com/csm/fr-ca-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064186',
SG:
'https://help.ovhcloud.com/csm/en-sg-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064192',
SN:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064198',
TN:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064198',
US: 'https://us.ovhcloud.com/support',
WE:
'https://help.ovhcloud.com/csm/en-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064191',
WS:
'https://help.ovhcloud.com/csm/es-public-cloud-managed-rancher-service-creation?id=kb_article_view&sysparm_article=KB0064185',
},
MANAGED_RANCHER_SERVICE_LIFECYCLE_POLICY: {
DEFAULT:
'https://help.ovhcloud.com/csm/en-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064598',
ASIA:
'https://help.ovhcloud.com/csm/asia-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064602',
AU:
'https://help.ovhcloud.com/csm/en-au-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064611',
CA:
'https://help.ovhcloud.com/csm/en-ca-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064609',
DE:
'https://help.ovhcloud.com/csm/de-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064600',
ES:
'https://help.ovhcloud.com/csm/es-es-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064605',
EU:
'https://help.ovhcloud.com/csm/en-ie-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064606',
FR:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064608',
GB:
'https://help.ovhcloud.com/csm/en-gb-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064607',
IE:
'https://help.ovhcloud.com/csm/en-ie-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064606',
IN:
'https://help.ovhcloud.com/csm/asia-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064602',
IT:
'https://help.ovhcloud.com/csm/it-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064612',
MA:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064608',
NL:
'https://help.ovhcloud.com/csm/en-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064598', // DEFAULT en attendant mieux
PL:
'https://help.ovhcloud.com/csm/pl-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064610',
PT:
'https://help.ovhcloud.com/csm/pt-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064604',
QC:
'https://help.ovhcloud.com/csm/fr-ca-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064599',
SG:
'https://help.ovhcloud.com/csm/en-sg-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064603',
SN:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064608',
TN:
'https://help.ovhcloud.com/csm/fr-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064608',
US: 'https://us.ovhcloud.com/support',
WE:
'https://help.ovhcloud.com/csm/en-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064598',
WS:
'https://help.ovhcloud.com/csm/es-public-cloud-managed-rancher-service-lifecycle-policy?id=kb_article_view&sysparm_article=KB0064601',
},
};

type GetGuideLinkProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,39 @@ export default function Onboarding() {
navigate(getCreateRancherUrl(projectId));
};

const tileList = [
const tileData = [
{
id: 1,
texts: {
title: t('managedRancherServiceGettingStartedTitle'),
description: t('managedRancherServiceGettingStartedTitleDescription'),
category: t('guideCategory'),
},
href: link?.MANAGED_RANCHER_SERVICE_GETTING_STARTED as string,

isExternalHref: true,
hoverable: true,
titleKey: 'managedRancherServiceGettingStartedTitle',
descriptionKey: 'managedRancherServiceGettingStartedTitleDescription',
hrefKey: 'MANAGED_RANCHER_SERVICE_GETTING_STARTED',
},
{
id: 2,
titleKey: 'managedRancherServiceGettingStartedTitle2',
descriptionKey: 'managedRancherServiceGettingStartedTitleDescription2',
hrefKey: 'MANAGED_RANCHER_SERVICE_CREATION',
},
{
id: 3,
titleKey: 'managedRancherServiceGettingStartedTitle3',
descriptionKey: 'managedRancherServiceGettingStartedTitleDescription3',
hrefKey: 'MANAGED_RANCHER_SERVICE_LIFECYCLE_POLICY',
},
];

const tileList = tileData.map((item) => ({
...item,
texts: {
title: t(item.titleKey),
description: t(item.descriptionKey),
category: t('guideCategory'),
},
href: link?.[item.hrefKey] as string,
isExternalHref: true,
hoverable: true,
}));

return (
<PageLayout>
<Breadcrumb />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jest.mock('@ovh-ux/manager-react-shell-client', () => ({
jest.mock('@/hooks/useGuideLink/useGuideLink', () => ({
useGuideUtils: jest.fn(() => ({
MANAGED_RANCHER_SERVICE_GETTING_STARTED: 'https://example.com/guide1',
MANAGED_RANCHER_SERVICE_CREATION: 'https://example.com/guide2',
MANAGED_RANCHER_SERVICE_LIFECYCLE_POLICY: 'https://example.com/guide3',
})),
}));

Expand Down Expand Up @@ -58,6 +60,12 @@ describe('Onboarding', () => {
it('renders the guide tiles correctly', async () => {
const screen = await setupSpecTest();

const tileList = [
{ id: 1, href: 'https://example.com/guide1' },
{ id: 2, href: 'https://example.com/guide2' },
{ id: 3, href: 'https://example.com/guide3' },
];

const guideTitle = screen.getByText(
onboardingTranslation.managedRancherServiceGettingStartedTitle,
);
Expand All @@ -68,15 +76,32 @@ describe('Onboarding', () => {
expect(guideTitle).toBeInTheDocument();
expect(guideDescription).toBeInTheDocument();

const card = screen.getByTestId('tileCard');
expect(card).toHaveAttribute('href', 'https://example.com/guide1');
const cards = screen.getAllByTestId('tileCard');
cards.forEach((card, index) => {
expect(card).toHaveAttribute('href', tileList[index].href);
});
});

it('uses the guide link utility correctly', async () => {
const guideUtils = useGuideUtils();

expect(guideUtils.MANAGED_RANCHER_SERVICE_GETTING_STARTED).toBe(
'https://example.com/guide1',
);
const expectedResults = [
{
key: 'MANAGED_RANCHER_SERVICE_GETTING_STARTED',
expectedValue: 'https://example.com/guide1',
},
{
key: 'MANAGED_RANCHER_SERVICE_CREATION',
expectedValue: 'https://example.com/guide2',
},
{
key: 'MANAGED_RANCHER_SERVICE_LIFECYCLE_POLICY',
expectedValue: 'https://example.com/guide3',
},
];

expectedResults.forEach((testCase) => {
expect(guideUtils[testCase.key]).toBe(testCase.expectedValue);
});
});
});

0 comments on commit 2aea101

Please sign in to comment.