Skip to content

Commit

Permalink
feat: migrate user credential list to react component
Browse files Browse the repository at this point in the history
  • Loading branch information
ironAiken2 committed Dec 18, 2024
1 parent 9c37a81 commit 8b8138c
Show file tree
Hide file tree
Showing 24 changed files with 676 additions and 48 deletions.
525 changes: 525 additions & 0 deletions react/src/components/UserCredentialList.tsx

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions react/src/pages/UserCredentialsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BAICard from '../BAICard';
import Flex from '../components/Flex';
import FlexActivityIndicator from '../components/FlexActivityIndicator';
import UserCredentialList from '../components/UserCredentialList';
import UserNodeList from '../components/UserNodeList';
import { createStyles } from 'antd-style';
import { CardTabListType } from 'antd/es/card';
Expand Down Expand Up @@ -54,8 +55,9 @@ const UserCredentialsPage: React.FC = () => {
</Flex>
)}
{curTabKey === 'credentials' && (
// @ts-expect-error
<backend-ai-credential-view active />
<Flex direction="column" align="stretch">
<UserCredentialList />
</Flex>
)}
</Suspense>
</BAICard>
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@
"ModifyUserDetail": "Benutzerdetails ändern",
"UserStatus": "Benutzer-Status",
"AdminCanOnlyRemoveTotp": "Es ist nur möglich, 2FA für andere Benutzer zu deaktivieren.",
"KeySeccessfullyDeleted": "KeyPair wird erfolgreich gelöscht.",
"RateLimitInputRequired": "Eingabe erforderlich.",
"InvalidRateLimitValue": "Geben Sie einen gültigen Ratengrenzwert ein.",
"WarningLessRateLimit": "Wenn der Wert für das Ratenlimit klein ist, können API-Vorgänge wie die Anmeldung blockiert werden.",
Expand All @@ -612,9 +611,15 @@
"InactivateTheFollowingUsers": "Deaktivieren Sie die folgenden Benutzer.",
"CreatedAt": "Erstellt am",
"SignoutSuccessfullyFinished": "Die Abmeldung ist erfolgreich abgeschlossen",
"AccessKey": "Zugriffsschlüssel",
"StatusUpdatedSuccessfully": "Der Benutzerstatus hat sich geändert.",
"ConfirmUpdateStatusToInActive": "Sind Sie sicher, dass Sie es deaktivieren wollen?",
"ConfirmUpdateStatusToActive": "Sind Sie sich sicher, dass Sie sie aktivieren wollen?"
"ConfirmUpdateStatusToActive": "Sind Sie sich sicher, dass Sie sie aktivieren wollen?",
"Queries": "Abfragen",
"ReqPer15Min": "Erforderlich pro 15 Min",
"Sessions": "Sitzungen",
"KeypairStatusUpdatedSuccessfully": "Der Schlüsselpaarstatus hat sich geändert.",
"KeypairSuccessfullyDeleted": "KeyPair wurde erfolgreich gelöscht."
},
"data": {
"Folders": "Ordner",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@
"ModifyUserDetail": "Τροποποίηση λεπτομερειών χρήστη",
"UserStatus": "Κατάσταση χρήστη",
"AdminCanOnlyRemoveTotp": "Είναι δυνατή μόνο η απενεργοποίηση της 2FA άλλων χρηστών.",
"KeySeccessfullyDeleted": "Το KeyPair διαγράφεται επιτυχώς.",
"RateLimitInputRequired": "Απαιτείται είσοδος.",
"InvalidRateLimitValue": "Εισάγετε μια έγκυρη τιμή ορίου ρυθμού.",
"WarningLessRateLimit": "Εάν η τιμή Όριο ρυθμού είναι μικρή, ενδέχεται να μπλοκαριστούν λειτουργίες API, όπως η σύνδεση.",
Expand All @@ -612,9 +611,15 @@
"InactivateTheFollowingUsers": "Απενεργοποιήστε τους παρακάτω χρήστες.",
"CreatedAt": "Δημιουργήθηκε στο",
"SignoutSuccessfullyFinished": "Η αποσύνδεση ολοκληρώθηκε επιτυχώς",
"AccessKey": "Κλειδί πρόσβασης",
"StatusUpdatedSuccessfully": "Η κατάσταση του χρήστη έχει αλλάξει.",
"ConfirmUpdateStatusToInActive": "Είσαι σίγουρος ότι θέλεις να το αδρανοποιήσεις;",
"ConfirmUpdateStatusToActive": "Είστε σίγουρος ότι θέλετε να το ενεργοποιήσετε;"
"ConfirmUpdateStatusToActive": "Είστε σίγουρος ότι θέλετε να το ενεργοποιήσετε;",
"Queries": "Ερωτήματα",
"ReqPer15Min": "Απαίτηση ανά 15 λεπτά",
"Sessions": "Συνεδρίες",
"KeypairStatusUpdatedSuccessfully": "Η κατάσταση του ζεύγους κλειδιών έχει αλλάξει.",
"KeypairSuccessfullyDeleted": "Το KeyPair διαγράφηκε με επιτυχία."
},
"data": {
"Folders": "Φάκελοι",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -733,15 +733,20 @@
"UserIDRequired": "User ID is required.",
"KeypairDetail": "Keypair Detail",
"AdminCanOnlyRemoveTotp": "Only disabling 2FA of other users is possible.",
"KeySeccessfullyDeleted": "KeyPair is seccessfully deleted.",
"EnableSudoSession": "Enable sudo session",
"MainAccessKey": "Main Access Key",
"InactivateTheFollowingUsers": "Inactivate the following users.",
"CreatedAt": "Created At",
"SignoutSuccessfullyFinished": "Signout is seccessfully finished",
"AccessKey": "Access Key",
"StatusUpdatedSuccessfully": "The user status has changed.",
"ConfirmUpdateStatusToInActive": "Are you sure you want to inactive it?",
"ConfirmUpdateStatusToActive": "Are you sure you want to active it?"
"ConfirmUpdateStatusToActive": "Are you sure you want to active it?",
"Queries": "Queries",
"ReqPer15Min": "Req per 15 min",
"Sessions": "Sessions",
"KeypairStatusUpdatedSuccessfully": "The keypair status has changed.",
"KeypairSuccessfullyDeleted": "KeyPair is successfully deleted."
},
"data": {
"Folders": "Folders",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
"Information": "Información",
"InvalidRateLimitValue": "Introduzca un valor válido de Límite de Tasa.",
"KeyAge": "Edad clave",
"KeySeccessfullyDeleted": "El llavero se elimina por completo.",
"KeypairCreated": "Par de claves creado con éxito.",
"KeypairDetail": "Detalle del par de claves",
"Lastused": "Último utilizado",
Expand Down Expand Up @@ -231,9 +230,15 @@
"InactivateTheFollowingUsers": "Desactivar los siguientes usuarios.",
"CreatedAt": "Creado en",
"SignoutSuccessfullyFinished": "El proceso de registro ha finalizado",
"AccessKey": "Clave de acceso",
"StatusUpdatedSuccessfully": "El estado del usuario ha cambiado.",
"ConfirmUpdateStatusToInActive": "¿Seguro que quieres desactivarlo?",
"ConfirmUpdateStatusToActive": "¿Seguro que quieres activarlo?"
"ConfirmUpdateStatusToActive": "¿Seguro que quieres activarlo?",
"Queries": "Consultas",
"ReqPer15Min": "Requerido por 15 min",
"Sessions": "Sesiones",
"KeypairStatusUpdatedSuccessfully": "El estado del par de claves ha cambiado.",
"KeypairSuccessfullyDeleted": "KeyPair se eliminó correctamente."
},
"data": {
"Allowslettersnumbersand-_": "Permite letras, números y -_",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
"Information": "Tiedot",
"InvalidRateLimitValue": "Syötä kelvollinen Rate Limit -arvo.",
"KeyAge": "Avain Ikä",
"KeySeccessfullyDeleted": "KeyPair on poistettu lopullisesti.",
"KeypairCreated": "Avainparin luominen onnistui.",
"KeypairDetail": "Avainparin tiedot",
"Lastused": "Viimeksi käytetty",
Expand Down Expand Up @@ -231,9 +230,15 @@
"InactivateTheFollowingUsers": "Poista seuraavat käyttäjät käytöstä.",
"CreatedAt": "Luotu klo",
"SignoutSuccessfullyFinished": "Uloskirjautuminen on päättynyt hetkessä",
"AccessKey": "Pääsyavain",
"StatusUpdatedSuccessfully": "Käyttäjän tila on muuttunut.",
"ConfirmUpdateStatusToInActive": "Oletko varma, että haluat jättää sen käyttämättä?",
"ConfirmUpdateStatusToActive": "Oletko varma, että haluat aktivoida sen?"
"ConfirmUpdateStatusToActive": "Oletko varma, että haluat aktivoida sen?",
"Queries": "Kyselyt",
"ReqPer15Min": "Req per 15 min",
"Sessions": "Istunnot",
"KeypairStatusUpdatedSuccessfully": "Näppäinparin tila on muuttunut.",
"KeypairSuccessfullyDeleted": "Avainparin poistaminen onnistui."
},
"data": {
"Allowslettersnumbersand-_": "Sallii kirjaimet, numerot ja -_",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,16 +605,21 @@
"WarningLessRateLimit": "Si la valeur de la limite de débit est faible, les opérations API telles que la connexion peuvent être bloquées.",
"KeypairDetail": "Détail de la paire de clés",
"AdminCanOnlyRemoveTotp": "Seule la désactivation du 2FA des autres utilisateurs est possible.",
"KeySeccessfullyDeleted": "La paire de clés est supprimée successivement.",
"ModifyUserDetail": "Modifier les détails de l'utilisateur",
"EnableSudoSession": "Activer la session sudo",
"MainAccessKey": "Clé d'accès principale",
"InactivateTheFollowingUsers": "Désactivez les utilisateurs suivants.",
"CreatedAt": "Créé à",
"SignoutSuccessfullyFinished": "La signature est terminée en toute sécurité",
"AccessKey": "Clé d'accès",
"StatusUpdatedSuccessfully": "Le statut de l'utilisateur a changé.",
"ConfirmUpdateStatusToInActive": "Êtes-vous sûr de vouloir l'inactiver ?",
"ConfirmUpdateStatusToActive": "Êtes-vous sûr de vouloir l'activer ?"
"ConfirmUpdateStatusToActive": "Êtes-vous sûr de vouloir l'activer ?",
"Queries": "Requêtes",
"ReqPer15Min": "Demande par 15 min",
"Sessions": "Séances",
"KeypairStatusUpdatedSuccessfully": "L'état de la paire de clés a changé.",
"KeypairSuccessfullyDeleted": "KeyPair est supprimé avec succès."
},
"data": {
"Folders": "Dossiers",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -606,16 +606,21 @@
"WarningLessRateLimit": "Jika nilai Rate Limit kecil, operasi API seperti login dapat diblokir.",
"KeypairDetail": "Detail Pasangan Kunci",
"AdminCanOnlyRemoveTotp": "Hanya menonaktifkan 2FA pengguna lain yang dapat dilakukan.",
"KeySeccessfullyDeleted": "KeyPair dihapus dengan aman.",
"ModifyUserDetail": "Ubah Detail Pengguna",
"EnableSudoSession": "Aktifkan sesi sudo",
"MainAccessKey": "Kunci Akses Utama",
"InactivateTheFollowingUsers": "Nonaktifkan pengguna berikut.",
"CreatedAt": "Dibuat Pada",
"SignoutSuccessfullyFinished": "Keluar dengan aman selesai",
"AccessKey": "Kunci Akses",
"StatusUpdatedSuccessfully": "Status pengguna telah berubah.",
"ConfirmUpdateStatusToInActive": "Apakah Anda yakin ingin menonaktifkannya?",
"ConfirmUpdateStatusToActive": "Apakah Anda yakin ingin mengaktifkannya?"
"ConfirmUpdateStatusToActive": "Apakah Anda yakin ingin mengaktifkannya?",
"Queries": "Pertanyaan",
"ReqPer15Min": "Persyaratan per 15 menit",
"Sessions": "Sesi",
"KeypairStatusUpdatedSuccessfully": "Status pasangan kunci telah berubah.",
"KeypairSuccessfullyDeleted": "KeyPair berhasil dihapus."
},
"data": {
"Folders": "Folder",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@
"ModifyUserDetail": "Modifica dei dettagli dell'utente",
"UserStatus": "Stato dell'utente",
"AdminCanOnlyRemoveTotp": "È possibile solo disabilitare la 2FA di altri utenti.",
"KeySeccessfullyDeleted": "KeyPair viene eliminato in modo sicuro.",
"RateLimitInputRequired": "Ingresso richiesto.",
"InvalidRateLimitValue": "Immettere un valore valido di Limite di velocità.",
"WarningLessRateLimit": "Se il valore di Rate Limit è piccolo, le operazioni API come il login possono essere bloccate.",
Expand All @@ -613,9 +612,15 @@
"InactivateTheFollowingUsers": "Disattiva i seguenti utenti.",
"CreatedAt": "Creato a",
"SignoutSuccessfullyFinished": "Il signout è terminato in modo sicuro",
"AccessKey": "Chiave di accesso",
"StatusUpdatedSuccessfully": "Lo stato dell'utente è cambiato.",
"ConfirmUpdateStatusToInActive": "Sei sicuro di volerlo inattivare?",
"ConfirmUpdateStatusToActive": "Sei sicuro di volerlo attivare?"
"ConfirmUpdateStatusToActive": "Sei sicuro di volerlo attivare?",
"Queries": "Domande",
"ReqPer15Min": "Richiesto ogni 15 min",
"Sessions": "Sessioni",
"KeypairStatusUpdatedSuccessfully": "Lo stato della coppia di chiavi è cambiato.",
"KeypairSuccessfullyDeleted": "KeyPair è stato eliminato con successo."
},
"data": {
"Folders": "cartelle",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@
"ModifyUserDetail": "ユーザー詳細情報の修正",
"UserStatus": "ユーザーステータス",
"AdminCanOnlyRemoveTotp": "他のユーザーの二重認証は解除のみ可能です。",
"KeySeccessfullyDeleted": "キーフェアが正常に削除されました。",
"RateLimitInputRequired": "Rate Limit値を入力してください。",
"InvalidRateLimitValue": "正しいRate Limit値を入力してください。",
"WarningLessRateLimit": "Rate Limit値が小さいと、ログインなどのAPI操作がブロックされることがあります。",
Expand All @@ -612,9 +611,15 @@
"InactivateTheFollowingUsers": "以下のユーザーを無効化します。",
"CreatedAt": "作成日",
"SignoutSuccessfullyFinished": "ユーザーアカウントが正常に削除されました。",
"AccessKey": "アクセスキー",
"StatusUpdatedSuccessfully": "ユーザーステータスが変更されました。",
"ConfirmUpdateStatusToInActive": "本当に活動休止したいのか?",
"ConfirmUpdateStatusToActive": "本当にアクティブにしたいのか?"
"ConfirmUpdateStatusToActive": "本当にアクティブにしたいのか?",
"Queries": "クエリ",
"ReqPer15Min": "15分あたりの要求",
"Sessions": "セッション",
"KeypairStatusUpdatedSuccessfully": "キーペアのステータスが変更されました。",
"KeypairSuccessfullyDeleted": "キーペアは正常に削除されました。"
},
"data": {
"Folders": "フォルダー",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -720,16 +720,21 @@
"UserIDRequired": "사용자 계정(email)은 필수 입력입니다.",
"KeypairDetail": "키페어 정보",
"AdminCanOnlyRemoveTotp": "다른 사용자의 이중 인증은 해제만 가능합니다.",
"KeySeccessfullyDeleted": "키페어가 정상적으로 삭제되었습니다.",
"ModifyUserDetail": "사용자 상세 정보 수정",
"EnableSudoSession": "sudo 세션 허용",
"MainAccessKey": "기본 액세스 키",
"InactivateTheFollowingUsers": "다음 사용자를 비활성화합니다.",
"CreatedAt": "생성 날짜",
"SignoutSuccessfullyFinished": "사용자 계정이 성공적으로 삭제되었습니다.",
"AccessKey": "접근키",
"StatusUpdatedSuccessfully": "사용자 상태가 변경되었습니다.",
"ConfirmUpdateStatusToInActive": "정말로 비활성화 하시겠습니까?",
"ConfirmUpdateStatusToActive": "정말로 활성화 하시겠습니까?"
"ConfirmUpdateStatusToActive": "정말로 활성화 하시겠습니까?",
"Queries": "쿼리",
"ReqPer15Min": "15분당 요청 수",
"Sessions": "세션",
"KeypairStatusUpdatedSuccessfully": "키페어 상태가 변경되었습니다.",
"KeypairSuccessfullyDeleted": "키페어가 정상적으로 삭제되었습니다."
},
"data": {
"Folders": "폴더",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/mn.json
Original file line number Diff line number Diff line change
Expand Up @@ -607,16 +607,21 @@
"WarningLessRateLimit": "Хэрэв ханшийн хязгаарын утга бага байвал нэвтрэх гэх мэт API үйлдлүүдийг хааж болно.",
"KeypairDetail": "Товчлуурын дэлгэрэнгүй",
"AdminCanOnlyRemoveTotp": "Зөвхөн бусад хэрэглэгчдийн 2FA-г идэвхгүй болгох боломжтой.",
"KeySeccessfullyDeleted": "KeyPair амжилттай устгагдсан.",
"ModifyUserDetail": "Хэрэглэгчийн мэдээллийг өөрчлөх",
"EnableSudoSession": "Sudo сессийг идэвхжүүлэх",
"MainAccessKey": "Үндсэн хандалтын түлхүүр",
"InactivateTheFollowingUsers": "Дараах хэрэглэгчдийг идэвхгүй болго.",
"CreatedAt": "Үүсгэсэн",
"SignoutSuccessfullyFinished": "Гарах ажиллагаа амжилттай дууслаа",
"AccessKey": "Хандалтын түлхүүр",
"StatusUpdatedSuccessfully": "Хэрэглэгчийн статус өөрчлөгдсөн.",
"ConfirmUpdateStatusToInActive": "Та үүнийг идэвхгүй болгохдоо итгэлтэй байна уу?",
"ConfirmUpdateStatusToActive": "Та үүнийг идэвхжүүлэхдээ итгэлтэй байна уу?"
"ConfirmUpdateStatusToActive": "Та үүнийг идэвхжүүлэхдээ итгэлтэй байна уу?",
"Queries": "Асуултууд",
"ReqPer15Min": "15 минут тутамд хэрэгцээ",
"Sessions": "Хурал",
"KeypairStatusUpdatedSuccessfully": "Товчлуурын хослол өөрчлөгдсөн.",
"KeypairSuccessfullyDeleted": "KeyPair амжилттай устгагдлаа."
},
"data": {
"Folders": "Фолдерууд",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/ms.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@
"ModifyUserDetail": "Ubah suai Butiran Pengguna",
"UserStatus": "Status Pengguna",
"AdminCanOnlyRemoveTotp": "Hanya melumpuhkan 2FA pengguna lain boleh dilakukan.",
"KeySeccessfullyDeleted": "KeyPair dipadamkan dengan selamat.",
"RateLimitInputRequired": "Input diperlukan.",
"InvalidRateLimitValue": "Masukkan nilai Had Kadar yang sah.",
"WarningLessRateLimit": "Jika nilai Had Kadar adalah kecil, operasi API seperti log masuk mungkin disekat.",
Expand All @@ -612,9 +611,15 @@
"InactivateTheFollowingUsers": "Nyahaktifkan pengguna berikut.",
"CreatedAt": "Dicipta Pada",
"SignoutSuccessfullyFinished": "Log keluar telah selesai dengan selamat",
"AccessKey": "Kunci Akses",
"StatusUpdatedSuccessfully": "Status pengguna telah berubah.",
"ConfirmUpdateStatusToInActive": "Adakah anda pasti mahu tidak mengaktifkannya?",
"ConfirmUpdateStatusToActive": "Adakah anda pasti mahu mengaktifkannya?"
"ConfirmUpdateStatusToActive": "Adakah anda pasti mahu mengaktifkannya?",
"Queries": "Pertanyaan",
"ReqPer15Min": "Req setiap 15 min",
"Sessions": "Sesi",
"KeypairStatusUpdatedSuccessfully": "Status pasangan kekunci telah berubah.",
"KeypairSuccessfullyDeleted": "KeyPair berjaya dipadamkan."
},
"data": {
"Folders": "Folder",
Expand Down
9 changes: 7 additions & 2 deletions resources/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@
"ModifyUserDetail": "Modyfikowanie szczegółów użytkownika",
"UserStatus": "Status użytkownika",
"AdminCanOnlyRemoveTotp": "Możliwe jest tylko wyłączenie 2FA innych użytkowników.",
"KeySeccessfullyDeleted": "Para kluczy jest usuwana.",
"RateLimitInputRequired": "Wymagane dane wejściowe.",
"InvalidRateLimitValue": "Wprowadź prawidłową wartość Rate Limit.",
"WarningLessRateLimit": "Jeśli wartość Rate Limit jest niska, operacje API, takie jak logowanie, mogą zostać zablokowane.",
Expand All @@ -612,9 +611,15 @@
"InactivateTheFollowingUsers": "Dezaktywuj następujących użytkowników.",
"CreatedAt": "Utworzono o godz",
"SignoutSuccessfullyFinished": "Wylogowanie zostało pomyślnie zakończone",
"AccessKey": "Klucz dostępu",
"StatusUpdatedSuccessfully": "Status użytkownika uległ zmianie.",
"ConfirmUpdateStatusToInActive": "Czy na pewno chcesz go nieaktywować?",
"ConfirmUpdateStatusToActive": "Czy na pewno chcesz go aktywować?"
"ConfirmUpdateStatusToActive": "Czy na pewno chcesz go aktywować?",
"Queries": "Zapytania",
"ReqPer15Min": "Zapotrzebowanie na 15 min",
"Sessions": "Sesje",
"KeypairStatusUpdatedSuccessfully": "Stan pary kluczy uległ zmianie.",
"KeypairSuccessfullyDeleted": "KeyPair został pomyślnie usunięty."
},
"data": {
"Folders": "Lornetka składana",
Expand Down
Loading

0 comments on commit 8b8138c

Please sign in to comment.