-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pci-block-storage): add exten beta (#13489)
Extend volume capacity to 12To Add banner for beta extension Implement dependent regions on block tiles ref: TAPC-1609, TAPC-2071, TAPC-2072, TAPC-1139, TAPC-1505, TAPC-2063, TAPC-1711, TAPC-1716, TAPC-1728, TAPC-1938 Signed-off-by: Simon Chaumet <[email protected]> Co-authored-by: Yann Lojewski <[email protected]> Co-authored-by: CDS Translator Agent <[email protected]>
- Loading branch information
1 parent
8b1cbf8
commit d217168
Showing
29 changed files
with
232 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_de_DE.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "Optimieren Sie Ihre Performance mit Block Storage NVMe over Fabric!\nErhältlich in der Betaphase in den Regionen {{regions}}, verdoppeln Sie die Performance Ihrer Classic Volumes und steigern Sie die Effizienz Ihrer rechenintensiven Aufgaben." | ||
} |
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_en_GB.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "Optimize your performance with Block Storage NVMe over Fabric!\nAvailable in the beta phase in the {{regions}} regions, double the performance of your Classic volumes and improve the efficiency of your intensive workloads." | ||
} |
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_es_ES.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "¡Optimice su rendimiento con Block Storage NVMe over Fabric!\nDisponible en fase beta en las regiones {{regions}}, duplique el rendimiento de sus volúmenes Classic y mejore la eficiencia de sus cargas de trabajo intensivas." | ||
} |
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_fr_CA.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "Optimisez vos performances avec Block Storage NVMe over Fabric !\nDisponible en phase bêta dans les régions {{regions}}, doublez les performances de vos volumes Classic et améliorez l'efficacité de vos charges de travail intensives." | ||
} |
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "Optimisez vos performances avec Block Storage NVMe over Fabric !\nDisponible en phase bêta dans les régions {{regions}}, doublez les performances de vos volumes Classic et améliorez l'efficacité de vos charges de travail intensives." | ||
} |
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_it_IT.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "Ottimizza le performance con Block Storage NVMe over Fabric!\nDisponibile in fase beta nelle Region {{regions}}, raddoppia le performance dei volumi Classic e migliora l'efficacia dei carichi di lavoro intensivi." | ||
} |
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_pl_PL.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "Zoptymalizuj swoją wydajność korzystając z Block Storage NVMe over Fabric!\nZwiększ wydajność wolumenów Classic i zwiększ wydajność w przypadku intensywnych obciążeń, dzięki czemu Twoje rozwiązania będą dostępne w fazie beta w regionach {{regions}}." | ||
} |
3 changes: 3 additions & 0 deletions
3
.../manager/apps/pci-block-storage/public/translations/exten-banner-beta/Messages_pt_PT.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"exten_banner_description": "Otimize as suas performances com o Block Storage NVMe over Fabric!\nDisponível na fase beta nas regiões {{regions}}, duplique os desempenhos dos seus volumes Classic e melhore a eficácia das suas cargas de trabalho intensivas." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/manager/apps/pci-block-storage/src/api/hooks/useQuota.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
import { getRegionsQuota } from '@/api/data/quota'; | ||
|
||
export const useRegionsQuota = (projectId: string) => | ||
export const useRegionsQuota = (projectId: string, region: string) => | ||
useQuery({ | ||
queryKey: ['project', projectId, 'quota'], | ||
queryFn: () => getRegionsQuota(projectId), | ||
queryKey: ['project', projectId, 'region', region, 'quota'], | ||
queryFn: () => getRegionsQuota(projectId, region), | ||
}); |
62 changes: 62 additions & 0 deletions
62
packages/manager/apps/pci-block-storage/src/components/exten-banner-beta/ExtenBannerBeta.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { useFeatureAvailability } from '@ovh-ux/manager-react-components'; | ||
import { OsdsMessage, OsdsText } from '@ovhcloud/ods-components/react'; | ||
import { | ||
ODS_MESSAGE_TYPE, | ||
ODS_TEXT_COLOR_HUE, | ||
ODS_TEXT_COLOR_INTENT, | ||
} from '@ovhcloud/ods-components'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { useParams } from 'react-router-dom'; | ||
import { useMemo } from 'react'; | ||
import { FA_EXTEN_BANNER } from '@/api/data/quota'; | ||
import { useProjectsAvailableVolumes } from '@/api/hooks/useProjectsAvailableVolumes'; | ||
|
||
const extenProducts = [ | ||
'volume.high-speed-BETA.consumption', | ||
'volume.classic-BETA.consumption', | ||
]; | ||
|
||
function Banner() { | ||
const { t } = useTranslation('exten-banner-beta'); | ||
const { projectId } = useParams(); | ||
const { data: availableVolumes } = useProjectsAvailableVolumes(projectId); | ||
|
||
const regionsString = useMemo( | ||
() => | ||
availableVolumes | ||
? [ | ||
...new Set( | ||
availableVolumes.plans | ||
.filter((p) => extenProducts.includes(p.code)) | ||
.flatMap((p) => p.regions) | ||
.map((r) => r.name), | ||
), | ||
].join(', ') | ||
: '', | ||
[availableVolumes], | ||
); | ||
|
||
if (!availableVolumes) return null; | ||
|
||
return ( | ||
<OsdsMessage type={ODS_MESSAGE_TYPE.info}> | ||
<OsdsText | ||
color={ODS_TEXT_COLOR_INTENT.info} | ||
style={{ whiteSpace: 'pre-wrap' }} | ||
hue={ODS_TEXT_COLOR_HUE._700} | ||
> | ||
{t('exten_banner_description', { | ||
regions: regionsString, | ||
})} | ||
</OsdsText> | ||
</OsdsMessage> | ||
); | ||
} | ||
|
||
export function ExtenBannerBeta() { | ||
const { data } = useFeatureAvailability([FA_EXTEN_BANNER]); | ||
|
||
if (!data?.[FA_EXTEN_BANNER]) return null; | ||
|
||
return <Banner />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.