File tree Expand file tree Collapse file tree 16 files changed +356
-0
lines changed
packages/manager/apps/pci-rancher
public/translations/guide Expand file tree Collapse file tree 16 files changed +356
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Anleitungen" ,
3+ "header_all_guides" : " Alle Anleitungen" ,
4+ "header_first_steps_with_instances" : " Erste Schritte mit den Instanzen" ,
5+ "header_create_managed_rancher" : " Managed Rancher Cluster erstellen" ,
6+ "header_update_managed_rancher" : " Managed Rancher Cluster aktualisieren" ,
7+ "header_iam_rancher" : " Identitäts- und Zugriffsverwaltung (IAM)" ,
8+ "header_authentification_iam" : " Enable IAM authentication on Registry (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Guides" ,
3+ "header_all_guides" : " All guides" ,
4+ "header_create_managed_rancher" : " Create a Managed Rancher cluster" ,
5+ "guides_header_first_steps_with_instances" : " Getting started with instances" ,
6+ "header_update_managed_rancher" : " Update a Managed Rancher cluster" ,
7+ "header_iam_rancher" : " Identity and Access Management (IAM)" ,
8+ "header_authentification_iam" : " Enable IAM authentication on Registry (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Guías" ,
3+ "header_all_guides" : " Todas las guías" ,
4+ "header_first_steps_with_instances" : " Primeros pasos con instancias" ,
5+ "header_create_managed_rancher" : " Crear un cluster Managed Rancher" ,
6+ "header_update_managed_rancher" : " Actualizar un cluster Managed Rancher" ,
7+ "header_iam_rancher" : " Gestión de identidades y accesos (IAM)" ,
8+ "header_authentification_iam" : " Activar autenticación IAM en Registry (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Guides" ,
3+ "header_all_guides" : " Tous les guides" ,
4+ "header_first_steps_with_instances" : " Premiers pas avec les instances" ,
5+ "header_create_managed_rancher" : " Créer un cluster Managed Rancher" ,
6+ "header_update_managed_rancher" : " Mettre à jour un cluster Managed Rancher" ,
7+ "header_iam_rancher" : " Gestion des identités et des accès (IAM)" ,
8+ "header_authentification_iam" : " Activer IAM authentification sur Registry (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Guides" ,
3+ "header_all_guides" : " Tous les guides" ,
4+ "header_first_steps_with_instances" : " Premiers pas avec les instances" ,
5+ "header_create_managed_rancher" : " Créer un cluster Managed Rancher" ,
6+ "header_update_managed_rancher" : " Mettre à jour un cluster Managed Rancher" ,
7+ "header_iam_rancher" : " Gestion des identités et des accès (IAM)" ,
8+ "header_authentification_iam" : " Activer IAM authentification (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Guide" ,
3+ "header_all_guides" : " Tutte le guide" ,
4+ "header_first_steps_with_instances" : " Iniziare a utilizzare le istanze" ,
5+ "header_create_managed_rancher" : " Creare un cluster Managed Rancher" ,
6+ "header_update_managed_rancher" : " Aggiornare un cluster Managed Rancher" ,
7+ "header_iam_rancher" : " Gestione delle identità e degli accessi (IAM)" ,
8+ "header_authentification_iam" : " Attivare l'autenticazione IAM su Registry (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Przewodniki" ,
3+ "header_all_guides" : " Wszystkie przewodniki" ,
4+ "header_create_managed_rancher" : " Utwórz klaster Managed Rancher" ,
5+ "guides_header_first_steps_with_instances" : " Pierwsze kroki z instancjami" ,
6+ "header_update_managed_rancher" : " Zaktualizuj klaster Managed Rancher" ,
7+ "header_iam_rancher" : " Zarządzanie tożsamością i dostępem (IAM)" ,
8+ "header_authentification_iam" : " Aktywuj uwierzytelnianie IAM w Registry (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Guias" ,
3+ "header_all_guides" : " Todos os guias" ,
4+ "header_create_managed_rancher" : " Criar um cluster Managed Rancher" ,
5+ "header_first_steps_with_instances" : " Primeiros passos com as instâncias" ,
6+ "header_update_managed_rancher" : " Atualizar um cluster Managed Rancher" ,
7+ "header_iam_rancher" : " Gestão de identidades e acessos (IAM)" ,
8+ "header_authentification_iam" : " Ativar autenticação IAM em Registry (EN)"
9+ }
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import {
3+ OsdsIcon ,
4+ OsdsLink ,
5+ OsdsMenuItem ,
6+ OsdsMenuGroup ,
7+ } from '@ovhcloud/ods-components/react' ;
8+ import { ODS_ICON_NAME , ODS_ICON_SIZE } from '@ovhcloud/ods-components' ;
9+ import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming' ;
10+ import { OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core' ;
11+ import { Guide } from './types' ;
12+
13+ interface GuidesHeaderItemProps {
14+ guide : Guide ;
15+ href : string ;
16+ label : string ;
17+ tracking ?: string ;
18+ onClick ?: ( guide : Guide ) => void ;
19+ }
20+
21+ export function GuidesHeaderItem ( {
22+ guide,
23+ href,
24+ label,
25+ onClick,
26+ } : GuidesHeaderItemProps ) {
27+ return (
28+ < OsdsMenuGroup >
29+ < OsdsMenuItem >
30+ < div className = "flex items-center" >
31+ < OsdsLink
32+ href = { href }
33+ color = { ODS_THEME_COLOR_INTENT . primary }
34+ target = { OdsHTMLAnchorElementTarget . _blank }
35+ onClick = { ( ) => {
36+ if ( onClick ) {
37+ onClick ( guide ) ;
38+ }
39+ } }
40+ >
41+ { label }
42+
43+ < span slot = "end" >
44+ < OsdsIcon
45+ className = "ml-4"
46+ size = { ODS_ICON_SIZE . xs }
47+ name = { ODS_ICON_NAME . EXTERNAL_LINK }
48+ color = { ODS_THEME_COLOR_INTENT . primary }
49+ />
50+ </ span >
51+ </ OsdsLink >
52+ </ div >
53+ </ OsdsMenuItem >
54+ </ OsdsMenuGroup >
55+ ) ;
56+ }
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import {
3+ OsdsButton ,
4+ OsdsIcon ,
5+ OsdsPopover ,
6+ OsdsPopoverContent ,
7+ } from '@ovhcloud/ods-components/react' ;
8+ import {
9+ ODS_BUTTON_SIZE ,
10+ ODS_BUTTON_VARIANT ,
11+ ODS_ICON_NAME ,
12+ ODS_ICON_SIZE ,
13+ } from '@ovhcloud/ods-components' ;
14+ import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming' ;
15+
16+ import { GuidesHeaderItem } from './guides-header-item.component' ;
17+ import { Guide } from './types' ;
18+
19+ export interface GuidesHeaderProps {
20+ label : string ;
21+ guides : Record < string , Guide > ;
22+ ovhSubsidiary : string ;
23+ getGuideLabel : ( guide : Guide ) => string ;
24+ onGuideClick ?: ( guide : Guide ) => void ;
25+ }
26+
27+ export function GuidesHeader ( {
28+ label,
29+ guides,
30+ ovhSubsidiary,
31+ getGuideLabel,
32+ onGuideClick,
33+ } : GuidesHeaderProps ) {
34+ return (
35+ < OsdsPopover >
36+ < span slot = "popover-trigger" >
37+ < div id = "guides-header-trigger" >
38+ < OsdsButton
39+ size = { ODS_BUTTON_SIZE . sm }
40+ slot = { 'menu-title' }
41+ variant = { ODS_BUTTON_VARIANT . ghost }
42+ color = { ODS_THEME_COLOR_INTENT . primary }
43+ >
44+ < span slot = "start" >
45+ < OsdsIcon
46+ color = { ODS_THEME_COLOR_INTENT . primary }
47+ size = { ODS_ICON_SIZE . xs }
48+ name = { ODS_ICON_NAME . BOOK }
49+ />
50+ </ span >
51+ { label }
52+ </ OsdsButton >
53+ </ div >
54+ </ span >
55+ < OsdsPopoverContent >
56+ { Object . entries ( guides ) . map ( ( [ key , guide ] ) => (
57+ < GuidesHeaderItem
58+ key = { key }
59+ guide = { guide }
60+ href = { guide . url [ ovhSubsidiary ] ?? guide . url . DEFAULT }
61+ label = { getGuideLabel ( guide ) }
62+ onClick = { ( g : Guide ) => {
63+ onGuideClick ?.( g ) ;
64+ } }
65+ />
66+ ) ) }
67+ </ OsdsPopoverContent >
68+ </ OsdsPopover >
69+ ) ;
70+ }
You can’t perform that action at this time.
0 commit comments