Skip to content

Commit dad0b04

Browse files
feat(pci-instances): add list of ssh keys and save new
ref: #TAPC-4623, #TAPC-4626 Signed-off-by: tsiorifamonjena <[email protected]> Co-authored-by: CDS Translator Agent <[email protected]>
1 parent 2b74e77 commit dad0b04

File tree

17 files changed

+267
-66
lines changed

17 files changed

+267
-66
lines changed

packages/manager/apps/pci-instances/public/translations/creation/Messages_de_DE.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Geben Sie Ihren SSH-Schlüssel ein",
8888
"pci_instance_creation_select_sshKey_add_key_description": "Die akzeptierten SSH-Schlüsseltypen sind RSA, ECDSA und ED25519. Ihr SSH-Schlüssel wird in allen Regionen und Rechenzentren von OVHcloud Ihres Projekts verfügbar sein.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Schlüssel validieren",
90-
"pci_instance_creation_select_sshKey_add_new": "Einen neuen SSH-Schlüssel erstellen"
90+
"pci_instance_creation_select_sshKey_add_new": "Einen neuen SSH-Schlüssel erstellen",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Wählen Sie einen vorhandenen Schlüssel aus",
92+
"pci_instance_creation_select_sshKey_add_key_done": "Ihr SSH-Schlüssel wird am Ende des Konfigurationsprozesses erstellt.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Bitte wählen Sie einen anderen Namen, dieser ist bereits vergeben."
9194
}

packages/manager/apps/pci-instances/public/translations/creation/Messages_en_GB.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Enter your SSH key",
8888
"pci_instance_creation_select_sshKey_add_key_description": "Accepted SSH keys are of type RSA, ECDSA, and ED25519. Your SSH key will be available across all OVHcloud regions and datacenters for your project.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Validate the key",
90-
"pci_instance_creation_select_sshKey_add_new": "Create a new SSH key"
90+
"pci_instance_creation_select_sshKey_add_new": "Create a new SSH key",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Select an existing key",
92+
"pci_instance_creation_select_sshKey_add_key_done": "Your SSH key will be created at the end of the setup process.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Thank you for choosing a different name, this one is already in use."
9194
}

packages/manager/apps/pci-instances/public/translations/creation/Messages_es_ES.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Introduce tu clave SSH",
8888
"pci_instance_creation_select_sshKey_add_key_description": "Las claves SSH aceptadas son de tipo RSA, ECDSA y ED25519. Tu clave SSH estará disponible en todas las regiones y centros de datos de OVHcloud de tu proyecto.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Validar la clave",
90-
"pci_instance_creation_select_sshKey_add_new": "Crear una nueva clave SSH"
90+
"pci_instance_creation_select_sshKey_add_new": "Crear una nueva clave SSH",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Seleccione una clave existente",
92+
"pci_instance_creation_select_sshKey_add_key_done": "Su clave SSH se creará al final del proceso de configuración.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Gracias por elegir un nombre diferente, este ya está en uso."
9194
}

packages/manager/apps/pci-instances/public/translations/creation/Messages_fr_CA.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Entrez votre clé SSH",
8888
"pci_instance_creation_select_sshKey_add_key_description": "Les clés SSH acceptées sont de type RSA, ECDSA et ED25519. Votre clé SSH sera disponible sur l’ensemble des régions et datacenters d’OVHcloud de votre projet.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Valider la clé",
90-
"pci_instance_creation_select_sshKey_add_new": "Créer une nouvelle clé SSH"
90+
"pci_instance_creation_select_sshKey_add_new": "Créer une nouvelle clé SSH",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Sélectionnez une clé existante",
92+
"pci_instance_creation_select_sshKey_add_key_done": "Votre clé SSH sera créée à la fin du processus de configuration.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Merci de choisir un nom différent, celui-ci est déjà utilisé"
9194
}

packages/manager/apps/pci-instances/public/translations/creation/Messages_fr_FR.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Entrez votre clé SSH",
8888
"pci_instance_creation_select_sshKey_add_key_description": "Les clés SSH acceptées sont de type RSA, ECDSA et ED25519. Votre clé SSH sera disponible sur l’ensemble des régions et datacenters d’OVHcloud de votre projet.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Valider la clé",
90-
"pci_instance_creation_select_sshKey_add_new": "Créer une nouvelle clé SSH"
90+
"pci_instance_creation_select_sshKey_add_new": "Créer une nouvelle clé SSH",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Sélectionnez une clé existante",
92+
"pci_instance_creation_select_sshKey_add_key_done": "Votre clé SSH sera créée à la fin du processus de configuration.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Merci de choisir un nom différent, celui-ci est déjà utilisé"
9194
}

packages/manager/apps/pci-instances/public/translations/creation/Messages_it_IT.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Inserisci la tua chiave SSH",
8888
"pci_instance_creation_select_sshKey_add_key_description": "Le chiavi SSH accettate sono di tipo RSA, ECDSA e ED25519. La tua chiave SSH sarà disponibile in tutte le regioni e i data center di OVHcloud del tuo progetto.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Conferma la chiave",
90-
"pci_instance_creation_select_sshKey_add_new": "Crea una nuova chiave SSH"
90+
"pci_instance_creation_select_sshKey_add_new": "Crea una nuova chiave SSH",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Seleziona una chiave esistente",
92+
"pci_instance_creation_select_sshKey_add_key_done": "La tua chiave SSH verrà creata al termine del processo di configurazione.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Grazie per aver scelto un nome diverso, questo è già in uso."
9194
}

packages/manager/apps/pci-instances/public/translations/creation/Messages_pl_PL.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Wprowadź swój klucz SSH",
8888
"pci_instance_creation_select_sshKey_add_key_description": "Akceptowane klucze SSH to RSA, ECDSA i ED25519. Twój klucz SSH będzie dostępny we wszystkich regionach i centrach danych OVHcloud w Twoim projekcie.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Zatwierdź klucz",
90-
"pci_instance_creation_select_sshKey_add_new": "Utwórz nowy klucz SSH"
90+
"pci_instance_creation_select_sshKey_add_new": "Utwórz nowy klucz SSH",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Wybierz istniejący klucz",
92+
"pci_instance_creation_select_sshKey_add_key_done": "Twój klucz SSH zostanie utworzony na końcu procesu konfiguracji.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Dziękujemy za wybranie innej nazwy, ta jest już używana."
9194
}

packages/manager/apps/pci-instances/public/translations/creation/Messages_pt_PT.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,8 @@
8787
"pci_instance_creation_select_sshKey_add_key_label": "Insira sua chave SSH",
8888
"pci_instance_creation_select_sshKey_add_key_description": "As chaves SSH aceitas são do tipo RSA, ECDSA e ED25519. Sua chave SSH estará disponível em todas as regiões e datacenters da OVHcloud do seu projeto.",
8989
"pci_instance_creation_select_sshKey_add_key_submit_btn": "Validar a chave",
90-
"pci_instance_creation_select_sshKey_add_new": "Criar uma nova chave SSH"
90+
"pci_instance_creation_select_sshKey_add_new": "Criar uma nova chave SSH",
91+
"pci_instance_creation_select_sshKey_dropdown_label": "Selecione uma chave existente",
92+
"pci_instance_creation_select_sshKey_add_key_done": "A sua chave SSH será criada no final do processo de configuração.",
93+
"pci_instance_creation_select_sshKey_add_name_unavailable_error": "Obrigado por escolher um nome diferente, este já está em uso."
9194
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { FC, PropsWithChildren } from 'react';
2+
import {
3+
Message,
4+
MessageIcon,
5+
ICON_NAME,
6+
MessageBody,
7+
MessageProp,
8+
} from '@ovhcloud/ods-react';
9+
10+
type TBannerProps = PropsWithChildren<MessageProp>;
11+
12+
const Banner: FC<TBannerProps> = ({ children, color, ...props }) => {
13+
const icon =
14+
color === 'warning' ? ICON_NAME.triangleExclamation : ICON_NAME.circleInfo;
15+
16+
return (
17+
<Message color={color} dismissible={false} {...props}>
18+
<MessageIcon name={icon} />
19+
<MessageBody>{children}</MessageBody>
20+
</Message>
21+
);
22+
};
23+
24+
export default Banner;

packages/manager/apps/pci-instances/src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const actionSectionRegex = /(?:rescue\/(start|end)|(?<!rescue\/)(start|st
3030

3131
export const instanceNameRegex = /^[a-zA-Z0-9-_.]{0,255}$/;
3232

33-
export const sshKeyRegex = /^(ssh|sk|ecdsa)-(rsa|ed\d+|sha2|ssh|ecdsa)\-?(ed\d+@.*|sha2.*|nistp\d+@.*)?.*/;
33+
export const sshKeyRegex = /^(ssh-(rsa|ed\d+)|ecdsa-sha2-nistp\d+) [A-Za-z0-9+\/=]+(?: [^\s]+)?$/;
3434

3535
export const CHANGELOG_LINKS = {
3636
changelog:

0 commit comments

Comments
 (0)