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