-
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-object-storage): add datagrid for user s3
ref: DTCORE-2876 Signed-off-by: Yoann Fievez <[email protected]>
- Loading branch information
Showing
28 changed files
with
997 additions
and
6 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Verwaltung der S3-Zugangsdaten", | ||
"pci_projects_project_storages_containers_users_username": "Nutzername", | ||
"pci_projects_project_storages_containers_users_description": "Beschreibung", | ||
"pci_projects_project_storages_containers_users_import_json": "S3 Policy (JSON) importieren", | ||
"pci_projects_project_storages_containers_users_download_json": "S3 Policy (JSON) herunterladen", | ||
"pci_projects_project_storages_containers_users_user_management": "Nutzerverwaltung", | ||
"pci_projects_project_storages_containers_users_user_description": "In dieser Rubrik können Sie einen neuen S3-Nutzer hinzufügen, Ihren Zugangsschlüssel und geheimen Schlüssel erhalten sowie die S3-Richtlinien verwalten.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Wenn ein Nutzerprofil erstellt ist, müssen die S3-Zugangsdaten dafür im Bereich „Nutzer & Rollen“ generiert werden.", | ||
"pci_projects_project_storages_containers_users_add_user": "Nutzer hinzufügen", | ||
"pci_projects_project_storages_containers_users_import_success_message": "Die JSON-Datei für den Nutzer {{user}} wurde komplett heruntergeladen.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "Beim Herunterladen der JSON-Datei für den Nutzer ist ein Fehler aufgetreten: {{ message }}.", | ||
"pci_projects_project_storages_containers_users_accesskey": "Zugriffsschlüssel", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Rclone-Datei herunterladen", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "Den geheimen Schlüssel anzeigen", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "Der geheime Schlüssel des Nutzers {{user}} ist {{secret}}.", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "Ihr geheimer S3-Schlüssel:", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "Beim Abrufen des geheimen Schlüssels des Nutzers {{ user }} ist ein Fehler aufgetreten: {{ message }}", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "Neue User haben automatisch Zugriff auf alle Container in den Local Zones." | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Manage your S3 credentials", | ||
"pci_projects_project_storages_containers_users_username": "Username", | ||
"pci_projects_project_storages_containers_users_description": "Description", | ||
"pci_projects_project_storages_containers_users_import_json": "Import S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_json": "Download S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_user_management": "User management", | ||
"pci_projects_project_storages_containers_users_user_description": "In this section you can add a new S3 user, get your access key and secret key, and manage S3 Policies.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Once your user has been created, you will need to generate the S3 credentials for them in the ‘Users & Roles’ section.", | ||
"pci_projects_project_storages_containers_users_add_user": "Add user", | ||
"pci_projects_project_storages_containers_users_import_success_message": "The JSON file linked to the {{user}} user has been downloaded.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "An error has occurred downloading the JSON file linked to the user: {{message}}", | ||
"pci_projects_project_storages_containers_users_accesskey": "Access key", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Download rclone file", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "View the secret key", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "Your {{user}} user's secret key is {{secret}}.", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "Your S3 secret key:", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "An error has occurred retrieving the secret key for the user {{ user }} : {{ message }}", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "New users will automatically have access to all containers in Local Zones." | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Gestión de claves S3", | ||
"pci_projects_project_storages_containers_users_username": "Nombre de usuario", | ||
"pci_projects_project_storages_containers_users_description": "Descripción", | ||
"pci_projects_project_storages_containers_users_import_json": "Importar S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_json": "Descargar S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_user_management": "Gestión de los usuarios", | ||
"pci_projects_project_storages_containers_users_user_description": "Desde esta sección podrá añadir un nuevo usuario S3, obtener su clave de acceso y su clave secreta, y gestionar las S3 Policies.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Una vez creado el usuario, deberá generar las claves S3 para él en la sección «Users & Roles».", | ||
"pci_projects_project_storages_containers_users_add_user": "Añadir un usuario", | ||
"pci_projects_project_storages_containers_users_import_success_message": "El archivo JSON asociado al usuario {{user}} se ha descargado correctamente.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "Se ha producido un error al descargar el archivo JSON asociado al usuario: {{ message }}.", | ||
"pci_projects_project_storages_containers_users_accesskey": "Clave de acceso", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Descargar el archivo Rclone", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "Ver la clave secreta", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "La clave secreta de su usuario {{user}} es {{secret}}.", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "Su llave secreta S3:", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "Se ha producido un error al cargar la clave secreta del usuario {{ user }}: {{ message }}", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "Los nuevos usuarios tendrán acceso automáticamente a todos los contenedores en las Local Zones." | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Gestion des credentials S3", | ||
"pci_projects_project_storages_containers_users_username": "Nom d'utilisateur", | ||
"pci_projects_project_storages_containers_users_description": "Description", | ||
"pci_projects_project_storages_containers_users_accesskey": "Clé d'accès", | ||
"pci_projects_project_storages_containers_users_import_json": "Importer S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_json": "Télécharger S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Télécharger le fichier rclone", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "Voir la clé secrète", | ||
"pci_projects_project_storages_containers_users_user_management": "Gestion des utilisateurs", | ||
"pci_projects_project_storages_containers_users_user_description": "Cette section vous permet d'ajouter un nouvel utilisateur S3, d'obtenir votre clé d'accès et votre clé secrète, et de gérer les S3 Policies.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Une fois votre utilisateur créé il sera nécessaire de générer les credentials S3 pour celui-ci dans la section «Users & Roles».", | ||
"pci_projects_project_storages_containers_users_add_user": "Ajouter un utilisateur", | ||
"pci_projects_project_storages_containers_users_import_success_message": "Le téléchargment du fichier JSON lié à l’utilisateur {{user}} a été effectué avec succès.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "Une erreur est survenue lors du téléchargement du fichier JSON lié à l’utilisateur : {{ message }}.", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "La clé secrète de votre utilisateur {{user}} est {{secret}}.", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "Une erreur est survenue lors de la récupération de la clé secrète de l'utilisateur {{ user }} : {{ message }}", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "Votre clé secrète S3 :", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "Les nouveaux utilisateurs auront automatiquement accès à tous les conteneurs dans les Local Zones." | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Gestion des credentials S3", | ||
"pci_projects_project_storages_containers_users_username": "Nom d'utilisateur", | ||
"pci_projects_project_storages_containers_users_description": "Description", | ||
"pci_projects_project_storages_containers_users_accesskey": "Clé d'accès", | ||
"pci_projects_project_storages_containers_users_import_json": "Importer S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_json": "Télécharger S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Télécharger le fichier rclone", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "Voir la clé secrète", | ||
"pci_projects_project_storages_containers_users_user_management": "Gestion des utilisateurs", | ||
"pci_projects_project_storages_containers_users_user_description": "Cette section vous permet d'ajouter un nouvel utilisateur S3, d'obtenir votre clé d'accès et votre clé secrète, et de gérer les S3 Policies.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Une fois votre utilisateur créé il sera nécessaire de générer les credentials S3 pour celui-ci dans la section «Users & Roles».", | ||
"pci_projects_project_storages_containers_users_add_user": "Ajouter un utilisateur", | ||
"pci_projects_project_storages_containers_users_import_success_message": "Le téléchargment du fichier JSON lié à l’utilisateur {{user}} a été effectué avec succès.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "Une erreur est survenue lors du téléchargement du fichier JSON lié à l’utilisateur : {{ message }}.", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "La clé secrète de votre utilisateur {{user}} est {{secret}}.", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "Une erreur est survenue lors de la récupération de la clé secrète de l'utilisateur {{ user }} : {{ message }}", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "Votre clé secrète S3 :", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "Les nouveaux utilisateurs auront automatiquement accès à tous les conteneurs dans les Local Zones." | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Gestione delle credenziali S3", | ||
"pci_projects_project_storages_containers_users_username": "Nome utente", | ||
"pci_projects_project_storages_containers_users_description": "Descrizione", | ||
"pci_projects_project_storages_containers_users_import_json": "Importa S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_json": "Scarica S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_user_management": "Gestione degli utenti", | ||
"pci_projects_project_storages_containers_users_user_description": "Questa sezione permette di aggiungere un nuovo utente S3, ottenere la chiave di accesso e la chiave segreta e gestire le policy S3.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Una volta creato l'utente, sarà necessario generare le credenziali S3 nella sezione \"Users & Roles\".", | ||
"pci_projects_project_storages_containers_users_add_user": "Aggiungere un utente", | ||
"pci_projects_project_storages_containers_users_import_success_message": "Il download del file JSON associato all'utente {{user}} è stato effettuato correttamente.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "Si è verificato un errore durante il download del file JSON associato all'utente: {{ message }}.", | ||
"pci_projects_project_storages_containers_users_accesskey": "Chiave di accesso", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Scarica il file Rclone", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "Mostra la chiave segreta", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "La chiave segreta dell’utente {{user}} è {{secret}}.", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "La tua chiave segreta S3:", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "Si è verificato un errore durante il recupero della chiave segreta dell'utente {{ user }}: {{ message }}", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "I nuovi utenti avranno automaticamente accesso a tutti i container nelle Local Zone." | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Zarządzanie poświadczeniami S3", | ||
"pci_projects_project_storages_containers_users_username": "Nazwa użytkownika", | ||
"pci_projects_project_storages_containers_users_description": "Opis", | ||
"pci_projects_project_storages_containers_users_import_json": "Importuj S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_json": "Pobierz S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_user_management": "Zarządzanie użytkownikami", | ||
"pci_projects_project_storages_containers_users_user_description": "W tej sekcji możesz dodać nowego użytkownika S3, uzyskać klucz dostępowy oraz klucz tajny i zarządzać polityką S3.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Po utworzeniu użytkownika konieczne jest wygenerowanie dla niego certyfikatu S3 w sekcji „Users & Roles”.", | ||
"pci_projects_project_storages_containers_users_add_user": "Dodaj użytkownika", | ||
"pci_projects_project_storages_containers_users_import_success_message": "Pobranie pliku JSON powiązanego z użytkownikiem {{user}} zostało wykonane.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "Wystąpił błąd podczas pobierania pliku JSON powiązanego z użytkownikiem: {{message}}", | ||
"pci_projects_project_storages_containers_users_accesskey": "Klucz dostępu", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Pobierz plik rclone", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "Wyświetl tajny klucz", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "Tajny klucz dla Twojego użytkownika {{user}} to {{secret}}.", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "Twój tajny klucz S3:", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "Wystąpił błąd podczas pobierania tajnego klucza użytkownika {{user}}: {{message}}", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "Nowi użytkownicy będą mieli automatycznie dostęp do wszystkich kontenerów w Local Zones." | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/manager/apps/pci-object-storage/public/translations/objects/users/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,20 @@ | ||
{ | ||
"pci_projects_project_storages_containers_users_title": "Gestão das credenciais S3", | ||
"pci_projects_project_storages_containers_users_username": "Nome de utilizador", | ||
"pci_projects_project_storages_containers_users_description": "Descrição", | ||
"pci_projects_project_storages_containers_users_import_json": "Importar S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_download_json": "Download da S3 Policy (JSON)", | ||
"pci_projects_project_storages_containers_users_user_management": "Gestão de utilizadores", | ||
"pci_projects_project_storages_containers_users_user_description": "Esta secção permite-lhe adicionar um novo utilizador S3, obter a sua chave de acesso e a sua chave secreta e gerir as S3 Policies.", | ||
"pci_projects_project_storages_containers_users_user_description_warning": "Depois de criar o utilizador, será necessário gerar as credenciais S3 na secção \"Utilizadores e funções\".", | ||
"pci_projects_project_storages_containers_users_add_user": "Adicionar um utilizador", | ||
"pci_projects_project_storages_containers_users_import_success_message": "O download do ficheiro JSON associado ao utilizador {{user}} foi efetuado com êxito.", | ||
"pci_projects_project_storages_containers_users_import_error_message": "Ocorreu um erro aquando do download do ficheiro JSON associado ao utilizador: {{ message }}.", | ||
"pci_projects_project_storages_containers_users_accesskey": "Chave de acesso", | ||
"pci_projects_project_storages_containers_users_download_rclone_file": "Descarregar o ficheiro rclone", | ||
"pci_projects_project_storages_containers_users_see_secret_key": "Ver a chave secreta", | ||
"pci_projects_project_storages_containers_users_show_secret_key_success": "A chave secreta do seu utilizador {{user}} é {{secret}}.", | ||
"pci_projects_project_storages_containers_users_add_success_field_secret_key": "A sua chave secreta S3:", | ||
"pci_projects_project_storages_containers_users_show_secret_key_error": "Ocorreu um erro durante a recuperação da chave secreta do utilizador {{ user }}: {{ message }}", | ||
"pci_projects_project_storages_containers_users_user_info_banner": "Os novos utilizadores terão automaticamente acesso a todos os containers nas Local Zones." | ||
} |
33 changes: 33 additions & 0 deletions
33
packages/manager/apps/pci-object-storage/src/api/data/user.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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { v6 } from '@ovh-ux/manager-core-api'; | ||
|
||
export type TS3Credentials = { | ||
userId: string; | ||
tenantId: string; | ||
access: string; | ||
}; | ||
|
||
export type TUser = { | ||
id: number; | ||
username: string; | ||
creationDate: string; | ||
description: string; | ||
openstackId: string; | ||
status: string; | ||
access?: string; | ||
search?: string; | ||
}; | ||
|
||
export const getAllUsers = async (projectId: string): Promise<TUser[]> => { | ||
const { data } = await v6.get<TUser[]>(`/cloud/project/${projectId}/user`); | ||
return data; | ||
}; | ||
|
||
export const getS3Credentials = async ( | ||
projectId: string, | ||
userId: number, | ||
): Promise<TS3Credentials> => { | ||
const { data } = await v6.get<TS3Credentials>( | ||
`/cloud/project/${projectId}/user/${userId}/s3Credentials`, | ||
); | ||
return data; | ||
}; |
Oops, something went wrong.