diff --git a/packages/manager/apps/pci-savings-plan/src/components/Breadcrumb/Breadcrumb.tsx b/packages/manager/apps/pci-savings-plan/src/components/Breadcrumb/Breadcrumb.tsx
index da40a1a4751a..7df5dfe13473 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/Breadcrumb/Breadcrumb.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/Breadcrumb/Breadcrumb.tsx
@@ -1,7 +1,10 @@
import React, { useState } from 'react';
import { Params, useLocation, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
-import { OsdsBreadcrumb } from '@ovhcloud/ods-components/react';
+import {
+ OdsBreadcrumb,
+ OdsBreadcrumbItem,
+} from '@ovhcloud/ods-components/react';
import { useNavigation } from '@ovh-ux/manager-react-shell-client';
import { useProject } from '@ovh-ux/manager-pci-common';
@@ -16,6 +19,7 @@ const getPageName = (location: string, t: (key: string) => string) => {
return [
{
label: t('createSavingsPlan'),
+ href: location,
},
];
}
@@ -45,20 +49,23 @@ const Breadcrumb: React.FC = () => {
updateNav();
}, [navigation, projectId]);
+ const breadcrumbItems = [
+ {
+ href: urlProject,
+ label: project?.description,
+ },
+ {
+ href: `${urlProject}/savings-plan`,
+ label: t('title'),
+ },
+ ...items,
+ ];
return (
-
+
+ {breadcrumbItems.map((item) => (
+ {item.label}
+ ))}
+
);
};
diff --git a/packages/manager/apps/pci-savings-plan/src/components/Commitment/Commitment.tsx b/packages/manager/apps/pci-savings-plan/src/components/Commitment/Commitment.tsx
index 2b76feb64882..2eccc20c89e2 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/Commitment/Commitment.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/Commitment/Commitment.tsx
@@ -1,9 +1,4 @@
-import {
- ODS_THEME_COLOR_INTENT,
- ODS_THEME_TYPOGRAPHY_SIZE,
-} from '@ovhcloud/ods-common-theming';
-import { ODS_TILE_SIZE, ODS_TILE_VARIANT } from '@ovhcloud/ods-components';
-import { OsdsText, OsdsTile } from '@ovhcloud/ods-components/react';
+import { OdsText, OdsCard } from '@ovhcloud/ods-components/react';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useCatalogPrice } from '@ovh-ux/manager-react-components';
@@ -42,54 +37,34 @@ const Commitment = ({
);
return (
-
-
- {t('commitment_month', { value: duration })}
-
-
+ {t('commitment_month', { value: duration })}
+
{diffInPercent ? `- ${diffInPercent} %` : ''}
-
+
{priceByMonthWithoutCommitment && (
-
+
{`~ ${getTextPrice(priceByMonthWithoutCommitment * CENTS_PRICE)}`}
-
+
)}
-
+
{getTextPrice(priceNumber * CENTS_PRICE)}
-
+
- {t('commitment_price_month')}
+ {t('commitment_price_month')}
-
+
);
};
diff --git a/packages/manager/apps/pci-savings-plan/src/components/Loading/Loading.tsx b/packages/manager/apps/pci-savings-plan/src/components/Loading/Loading.tsx
index bb74a4fa8e15..863da5efde54 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/Loading/Loading.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/Loading/Loading.tsx
@@ -1,10 +1,10 @@
import React from 'react';
-import { OsdsSpinner } from '@ovhcloud/ods-components/react';
+import { OdsSpinner } from '@ovhcloud/ods-components/react';
export default function Loading() {
return (
-
+
);
}
diff --git a/packages/manager/apps/pci-savings-plan/src/components/PlannedChangeStatusChip/PlannedChangeStatusChip.tsx b/packages/manager/apps/pci-savings-plan/src/components/PlannedChangeStatusChip/PlannedChangeStatusChip.tsx
index b96c8d943df9..d9fea74111af 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/PlannedChangeStatusChip/PlannedChangeStatusChip.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/PlannedChangeStatusChip/PlannedChangeStatusChip.tsx
@@ -1,6 +1,5 @@
-import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
-import { ODS_SPINNER_SIZE } from '@ovhcloud/ods-components';
-import { OsdsChip, OsdsSpinner } from '@ovhcloud/ods-components/react';
+import { ODS_SPINNER_SIZE, ODS_BADGE_COLOR } from '@ovhcloud/ods-components';
+import { OdsBadge, OdsSpinner } from '@ovhcloud/ods-components/react';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { SavingsPlanPlanedChangeStatus } from '@/types/api.type';
@@ -8,21 +7,19 @@ import { SavingsPlanPlanedChangeStatus } from '@/types/api.type';
const PlannedChangeStatusChip = ({ label }: { label: string }) => {
const { t } = useTranslation('listing');
const colorByProductStatus: {
- [key in SavingsPlanPlanedChangeStatus]: ODS_THEME_COLOR_INTENT;
+ [key in SavingsPlanPlanedChangeStatus]: ODS_BADGE_COLOR;
} = {
- [SavingsPlanPlanedChangeStatus.REACTIVATE]: ODS_THEME_COLOR_INTENT.success,
- [SavingsPlanPlanedChangeStatus.TERMINATE]: ODS_THEME_COLOR_INTENT.error,
+ [SavingsPlanPlanedChangeStatus.REACTIVATE]: ODS_BADGE_COLOR.success,
+ [SavingsPlanPlanedChangeStatus.TERMINATE]: ODS_BADGE_COLOR.critical,
};
return label ? (
-
- {t(label.toLowerCase() as SavingsPlanPlanedChangeStatus)}
-
+ />
) : (
-
+
);
};
diff --git a/packages/manager/apps/pci-savings-plan/src/components/SimpleTile/SimpleTile.tsx b/packages/manager/apps/pci-savings-plan/src/components/SimpleTile/SimpleTile.tsx
index 2412cc602ef7..a68551eb13dc 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/SimpleTile/SimpleTile.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/SimpleTile/SimpleTile.tsx
@@ -1,19 +1,11 @@
-import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
-import { ODS_TILE_VARIANT } from '@ovhcloud/ods-components';
-import { OsdsTile } from '@ovhcloud/ods-components/react';
+import { OdsCard } from '@ovhcloud/ods-components/react';
import React from 'react';
const SimpleTile: React.FC void;
isActive?: boolean;
}>> = ({ children, onClick, isActive }) => (
-
{children}
-
+
);
export default SimpleTile;
diff --git a/packages/manager/apps/pci-savings-plan/src/components/StatusChip/StatusChip.tsx b/packages/manager/apps/pci-savings-plan/src/components/StatusChip/StatusChip.tsx
index 40ce02e05c87..387a1ca1685a 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/StatusChip/StatusChip.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/StatusChip/StatusChip.tsx
@@ -1,6 +1,5 @@
-import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
-import { ODS_SPINNER_SIZE } from '@ovhcloud/ods-components';
-import { OsdsChip, OsdsSpinner } from '@ovhcloud/ods-components/react';
+import { ODS_SPINNER_SIZE, ODS_BADGE_COLOR } from '@ovhcloud/ods-components';
+import { OdsBadge, OdsSpinner } from '@ovhcloud/ods-components/react';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { SavingsPlanStatus } from '@/types/api.type';
@@ -8,19 +7,20 @@ import { SavingsPlanStatus } from '@/types/api.type';
const StatusChip = ({ label }: { label: string }) => {
const { t } = useTranslation('listing');
const colorByProductStatus: {
- [key in SavingsPlanStatus]: ODS_THEME_COLOR_INTENT;
+ [key in SavingsPlanStatus]: ODS_BADGE_COLOR;
} = {
- [SavingsPlanStatus.ACTIVE]: ODS_THEME_COLOR_INTENT.success,
- [SavingsPlanStatus.PENDING]: ODS_THEME_COLOR_INTENT.warning,
- [SavingsPlanStatus.TERMINATED]: ODS_THEME_COLOR_INTENT.error,
+ [SavingsPlanStatus.ACTIVE]: ODS_BADGE_COLOR.success,
+ [SavingsPlanStatus.PENDING]: ODS_BADGE_COLOR.warning,
+ [SavingsPlanStatus.TERMINATED]: ODS_BADGE_COLOR.critical,
};
return label ? (
-
- {t(label.toLowerCase() as SavingsPlanStatus)}
-
+
) : (
-
+
);
};
diff --git a/packages/manager/apps/pci-savings-plan/src/components/Table/TableContainer.tsx b/packages/manager/apps/pci-savings-plan/src/components/Table/TableContainer.tsx
index 0305f5a13eec..cb71d43db672 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/Table/TableContainer.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/Table/TableContainer.tsx
@@ -1,11 +1,6 @@
import React, { useContext, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import {
- useLocation,
- useNavigate,
- useParams,
- useSearchParams,
-} from 'react-router-dom';
+import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
import { ShellContext } from '@ovh-ux/manager-react-shell-client';
import {
diff --git a/packages/manager/apps/pci-savings-plan/src/components/TileTechnicalInfo/TileTechnicalInfo.tsx b/packages/manager/apps/pci-savings-plan/src/components/TileTechnicalInfo/TileTechnicalInfo.tsx
index a70fb32f9ff8..f82b42d96d83 100644
--- a/packages/manager/apps/pci-savings-plan/src/components/TileTechnicalInfo/TileTechnicalInfo.tsx
+++ b/packages/manager/apps/pci-savings-plan/src/components/TileTechnicalInfo/TileTechnicalInfo.tsx
@@ -1,10 +1,9 @@
import React from 'react';
import {
ODS_THEME_COLOR_HUE,
- ODS_THEME_COLOR_INTENT,
ODS_THEME_TYPOGRAPHY_SIZE,
} from '@ovhcloud/ods-common-theming';
-import { OsdsText } from '@ovhcloud/ods-components/react';
+import { OdsText } from '@ovhcloud/ods-components/react';
import { useTranslation } from 'react-i18next';
import SimpleTile from '../SimpleTile/SimpleTile';
import { formatTechnicalInfo } from '@/utils/formatter/formatter';
@@ -18,30 +17,27 @@ const DisplayTechnicalInfo = ({
const { memory, cpu, storage, bandwidth } = technical;
return (
<>
-
+
{t('resource_model_characteristics_gb', {
value: memory.size,
})}
-
-
+
+
{t('resource_model_characteristics_cpu', {
cores: cpu.cores,
ghz: cpu.frequency,
})}
-
-
+
+
{t('resource_model_characteristics_disk', {
value: storage.disks[0].capacity,
})}
-
-
+
+
{t('resource_model_characteristics_mbits', {
value: bandwidth.level,
})}
-
+
>
);
};
@@ -61,14 +57,14 @@ export const TileTechnicalInfo: React.FC = ({
}) => (
-
{name}
-
+
{technical && technical.bandwidth && (
)}