Skip to content

Commit

Permalink
feat: fetch container registries with new nodes query
Browse files Browse the repository at this point in the history
  • Loading branch information
agatha197 committed Oct 11, 2024
1 parent 23b5f81 commit 924a6c1
Show file tree
Hide file tree
Showing 27 changed files with 1,784 additions and 199 deletions.
450 changes: 444 additions & 6 deletions react/data/schema.graphql

Large diffs are not rendered by default.

237 changes: 123 additions & 114 deletions react/src/components/ContainerRegistryEditorModal.tsx

Large diffs are not rendered by default.

411 changes: 411 additions & 0 deletions react/src/components/ContainerRegistryEditorModalBefore2409.tsx

Large diffs are not rendered by default.

201 changes: 144 additions & 57 deletions react/src/components/ContainerRegistryList.tsx

Large diffs are not rendered by default.

569 changes: 569 additions & 0 deletions react/src/components/ContainerRegistryListBefore2409.tsx

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion react/src/pages/EnvironmentPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ContainerRegistryList from '../components/ContainerRegistryList';
import ContainerRegistryListBefore2409 from '../components/ContainerRegistryListBefore2409';
import FlexActivityIndicator from '../components/FlexActivityIndicator';
import ImageList from '../components/ImageList';
import ResourcePresetList from '../components/ResourcePresetList';
Expand All @@ -17,6 +18,8 @@ const EnvironmentPage = () => {
const isSupportContainerRegistryGraphQL = baiClient.supports(
'container-registry-gql',
);
const isSupportContainerRegistryNodes =
baiClient?.isManagerVersionCompatibleWith('24.09.0');

return (
<Card
Expand Down Expand Up @@ -60,8 +63,13 @@ const EnvironmentPage = () => {
{curTabKey === 'preset' && <ResourcePresetList />}
{curTabKey === 'registry' ? (
isSupportContainerRegistryGraphQL ? (
<ContainerRegistryList />
isSupportContainerRegistryNodes ? (
<ContainerRegistryList />
) : (
<ContainerRegistryListBefore2409 />
)
) : (
// TODO: remove this from 24.09.2
// @ts-ignore
<backend-ai-registry-list active />
)
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Keine Registrierungen anzeigen",
"ModifyRegistry": "Registry ändern",
"ConfirmNoUserName": "Benutzer und Passwort nicht angegeben, möchten Sie speichern?",
"DescURLFormat": "Ungültiger URL-Typ"
"DescURLFormat": "Ungültiger URL-Typ",
"RegistryName": "Registrierungsname",
"DescRegistryNameIsEmpty": "Der Registrierungsname ist leer",
"RegistryNameAlreadyExists": "Der Registrierungsname ist bereits vorhanden. \nBitte ändern Sie den hinzuzufügenden Registrierungsnamen."
},
"resourceGroup": {
"ResourceGroups": "Ressourcengruppen",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Δεν εμφανίζονται μητρώα",
"ModifyRegistry": "Τροποποίηση μητρώου",
"ConfirmNoUserName": "Ο χρήστης και ο κωδικός πρόσβασης δεν έχουν καθοριστεί, θέλετε να αποθηκεύσετε;",
"DescURLFormat": "Μη έγκυρος τύπος URL"
"DescURLFormat": "Μη έγκυρος τύπος URL",
"RegistryName": "Όνομα Μητρώου",
"DescRegistryNameIsEmpty": "Το όνομα μητρώου είναι κενό",
"RegistryNameAlreadyExists": "Το όνομα μητρώου υπάρχει ήδη. \nΑλλάξτε το όνομα μητρώου για προσθήκη."
},
"resourceGroup": {
"ResourceGroups": "Ομάδες πόρων",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,10 @@
"RegistrySuccessfullyModified": "Registry successfully modified.",
"PleaseSelectOption": "Please Select Option",
"ConfirmNoUserName": "User and password not specified, would you like to save?",
"DescURLFormat": "Invalid URL Type"
"DescURLFormat": "Invalid URL Type",
"RegistryName": "Registry Name",
"DescRegistryNameIsEmpty": "Registry name is empty",
"RegistryNameAlreadyExists": "Registry name already exists. Please change the registry name to add."
},
"resourceGroup": {
"ResourceGroups": "Resource Groups",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,10 @@
"Username": "Nombre de usuario",
"UsernameOptional": "Nombre de usuario (opcional)",
"ConfirmNoUserName": "Usuario y contraseña no especificados, ¿desea guardar?",
"DescURLFormat": "Tipo de URL no válido"
"DescURLFormat": "Tipo de URL no válido",
"RegistryName": "Nombre de registro",
"DescRegistryNameIsEmpty": "El nombre del registro está vacío",
"RegistryNameAlreadyExists": "El nombre del registro ya existe. \nCambie el nombre del registro para agregar."
},
"resourceGroup": {
"Active": "Activo",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,10 @@
"Username": "Käyttäjätunnus",
"UsernameOptional": "Käyttäjätunnus (valinnainen)",
"ConfirmNoUserName": "Käyttäjää ja salasanaa ei ole määritetty, haluatko tallentaa?",
"DescURLFormat": "Virheellinen URL-tyyppi"
"DescURLFormat": "Virheellinen URL-tyyppi",
"RegistryName": "Rekisterin nimi",
"DescRegistryNameIsEmpty": "Rekisterin nimi on tyhjä",
"RegistryNameAlreadyExists": "Rekisterin nimi on jo olemassa. \nMuuta lisättävä rekisterinimi."
},
"resourceGroup": {
"Active": "Aktiivinen",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"ModifyRegistry": "Modifier le registre",
"NoRegistryToDisplay": "Aucun registre à afficher",
"ConfirmNoUserName": "L'utilisateur et le mot de passe ne sont pas spécifiés, voulez-vous sauvegarder ?",
"DescURLFormat": "Type d'URL invalide"
"DescURLFormat": "Type d'URL invalide",
"RegistryName": "Nom du registre",
"DescRegistryNameIsEmpty": "Le nom du registre est vide",
"RegistryNameAlreadyExists": "Le nom du registre existe déjà. \nVeuillez modifier le nom du registre à ajouter."
},
"resourceGroup": {
"ResourceGroups": "Groupes de ressources",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,10 @@
"ModifyRegistry": "Memodifikasi Registri",
"NoRegistryToDisplay": "Tidak ada Pendaftaran untuk ditampilkan",
"ConfirmNoUserName": "Pengguna dan kata sandi tidak ditentukan, apakah Anda ingin menyimpan?",
"DescURLFormat": "Jenis URL tidak valid"
"DescURLFormat": "Jenis URL tidak valid",
"RegistryName": "Nama Registri",
"DescRegistryNameIsEmpty": "Nama registri kosong",
"RegistryNameAlreadyExists": "Nama registri sudah ada. \nSilakan ubah nama registri untuk ditambahkan."
},
"resourceGroup": {
"ResourceGroups": "Grup Sumber Daya",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Nessun registro da visualizzare",
"ModifyRegistry": "Modificare il registro",
"ConfirmNoUserName": "Utente e password non specificati, si desidera salvare?",
"DescURLFormat": "Tipo di URL non valido"
"DescURLFormat": "Tipo di URL non valido",
"RegistryName": "Nome del registro",
"DescRegistryNameIsEmpty": "Il nome del registro è vuoto",
"RegistryNameAlreadyExists": "Il nome del registro esiste già. \nModificare il nome del registro da aggiungere."
},
"resourceGroup": {
"ResourceGroups": "Gruppi di risorse",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "レジストリ情報がありません。",
"ModifyRegistry": "レジストリの修正",
"ConfirmNoUserName": "ユーザーとパスワードが指定されていません。",
"DescURLFormat": "無効な URL タイプ"
"DescURLFormat": "無効な URL タイプ",
"RegistryName": "レジストリ名",
"DescRegistryNameIsEmpty": "レジストリ名が空です",
"RegistryNameAlreadyExists": "レジストリ名はすでに存在します。\n追加するレジストリ名を変更してください。"
},
"resourceGroup": {
"ResourceGroups": "リソースグループ",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,10 @@
"RegistrySuccessfullyModified": "레지스트리가 성공적으로 수정되었습니다.",
"PleaseSelectOption": "옵션을 선택하세요",
"ConfirmNoUserName": "사용자 및 비밀번호가 지정되지 않았습니다. 저장하시겠습니까?",
"DescURLFormat": "올바르지 않는 URL 타입입니다."
"DescURLFormat": "올바르지 않는 URL 타입입니다.",
"RegistryName": "레지스트리 이름",
"DescRegistryNameIsEmpty": "레지스트리 이름이 비어 있습니다.",
"RegistryNameAlreadyExists": "레지스트리 이름이 이미 존재합니다. \n레지스트리 이름을 변경해주세요."
},
"resourceGroup": {
"ResourceGroups": "자원 그룹",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/mn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"ModifyRegistry": "Бүртгэлийг өөрчлөх",
"NoRegistryToDisplay": "Харуулах бүртгэл байхгүй",
"ConfirmNoUserName": "Хэрэглэгч болон нууц үгийг заагаагүй тул хадгалах уу?",
"DescURLFormat": "Хүчингүй URL төрөл"
"DescURLFormat": "Хүчингүй URL төрөл",
"RegistryName": "Бүртгэлийн нэр",
"DescRegistryNameIsEmpty": "Бүртгэлийн нэр хоосон байна",
"RegistryNameAlreadyExists": "Бүртгэлийн нэр аль хэдийн байна. \nНэмэх бүртгэлийн нэрийг өөрчилнө үү."
},
"resourceGroup": {
"ResourceGroups": "Нөөцийн бүлгүүд",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/ms.json
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,10 @@
"NoRegistryToDisplay": "Tiada Pendaftaran untuk dipaparkan",
"ModifyRegistry": "Ubah suai Pendaftaran",
"ConfirmNoUserName": "Pengguna dan kata laluan tidak dinyatakan, adakah anda ingin menyimpan?",
"DescURLFormat": "Jenis URL tidak sah"
"DescURLFormat": "Jenis URL tidak sah",
"RegistryName": "Nama Pendaftaran",
"DescRegistryNameIsEmpty": "Nama pendaftaran kosong",
"RegistryNameAlreadyExists": "Nama pendaftaran sudah wujud. \nSila tukar nama pendaftaran untuk ditambahkan."
},
"resourceGroup": {
"ResourceGroups": "Kumpulan Sumber",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Brak rejestrów do wyświetlenia",
"ModifyRegistry": "Modyfikacja rejestru",
"ConfirmNoUserName": "Użytkownik i hasło nie zostały określone, czy chcesz zapisać?",
"DescURLFormat": "Nieprawidłowy typ adresu URL"
"DescURLFormat": "Nieprawidłowy typ adresu URL",
"RegistryName": "Nazwa rejestru",
"DescRegistryNameIsEmpty": "Nazwa rejestru jest pusta",
"RegistryNameAlreadyExists": "Nazwa rejestru już istnieje. \nZmień nazwę rejestru, aby go dodać."
},
"resourceGroup": {
"ResourceGroups": "Grupy zasobów",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Não há registos a apresentar",
"ModifyRegistry": "Modificar o registo",
"ConfirmNoUserName": "Utilizador e palavra-passe não especificados, pretende guardar?",
"DescURLFormat": "Tipo de URL inválido"
"DescURLFormat": "Tipo de URL inválido",
"RegistryName": "Nome do registro",
"DescRegistryNameIsEmpty": "O nome do registro está vazio",
"RegistryNameAlreadyExists": "O nome do registro já existe. \nAltere o nome do registro para adicionar."
},
"resourceGroup": {
"ResourceGroups": "Grupos de Recursos",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Não há registos a apresentar",
"ModifyRegistry": "Modificar o registo",
"ConfirmNoUserName": "Utilizador e palavra-passe não especificados, pretende guardar?",
"DescURLFormat": "Tipo de URL inválido"
"DescURLFormat": "Tipo de URL inválido",
"RegistryName": "Nome do Registro",
"DescRegistryNameIsEmpty": "O nome do registro está vazio",
"RegistryNameAlreadyExists": "O nome do registro já existe. \nAltere o nome do registro para adicionar."
},
"resourceGroup": {
"ResourceGroups": "Grupos de Recursos",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,10 @@
"ModifyRegistry": "Изменение реестра",
"NoRegistryToDisplay": "Отсутствие отображаемых реестров",
"ConfirmNoUserName": "Пользователь и пароль не указаны, хотите сохранить?",
"DescURLFormat": "Неверный тип URL"
"DescURLFormat": "Неверный тип URL",
"RegistryName": "Имя реестра",
"DescRegistryNameIsEmpty": "Имя реестра пусто",
"RegistryNameAlreadyExists": "Имя реестра уже существует. \nПожалуйста, измените имя реестра для добавления."
},
"resourceGroup": {
"ResourceGroups": "Группы ресурсов",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,10 @@
"RegistrySuccessfullyModified": "แก้ไขทะเบียนสำเร็จแล้ว",
"PleaseSelectOption": "กรุณาเลือกตัวเลือก",
"ConfirmNoUserName": "ไม่ได้ระบุชื่อผู้ใช้และรหัสผ่าน คุณต้องการบันทึกหรือไม่?",
"DescURLFormat": "รูปแบบ URL ไม่ถูกต้อง"
"DescURLFormat": "รูปแบบ URL ไม่ถูกต้อง",
"RegistryName": "ชื่อรีจิสทรี",
"DescRegistryNameIsEmpty": "ชื่อรีจิสทรีว่างเปล่า",
"RegistryNameAlreadyExists": "มีชื่อรีจิสทรีอยู่แล้ว \nกรุณาเปลี่ยนชื่อรีจิสทรีที่จะเพิ่ม"
},
"resourceGroup": {
"ResourceGroups": "กลุ่มทรัพยากร",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Görüntülenecek Kayıt Yok",
"ModifyRegistry": "Kayıt Defterini Değiştir",
"ConfirmNoUserName": "Kullanıcı ve şifre belirtilmemiş, kaydetmek ister misiniz?",
"DescURLFormat": "Geçersiz URL Türü"
"DescURLFormat": "Geçersiz URL Türü",
"RegistryName": "Kayıt Defteri Adı",
"DescRegistryNameIsEmpty": "Kayıt defteri adı boş",
"RegistryNameAlreadyExists": "Kayıt defteri adı zaten mevcut. \nLütfen eklemek için kayıt defteri adını değiştirin."
},
"resourceGroup": {
"ResourceGroups": "Kaynak Grupları",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "Không có đăng ký để hiển thị",
"ModifyRegistry": "Sửa đổi sổ đăng ký",
"ConfirmNoUserName": "Người dùng và mật khẩu không được chỉ định, bạn có muốn lưu không?",
"DescURLFormat": "Loại URL không hợp lệ"
"DescURLFormat": "Loại URL không hợp lệ",
"RegistryName": "Tên đăng ký",
"DescRegistryNameIsEmpty": "Tên đăng ký trống",
"RegistryNameAlreadyExists": "Tên đăng ký đã tồn tại. \nVui lòng thay đổi tên đăng ký để thêm."
},
"resourceGroup": {
"ResourceGroups": "Nhóm tài nguyên",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,10 @@
"NoRegistryToDisplay": "无注册表显示",
"ModifyRegistry": "修改注册表",
"ConfirmNoUserName": "未指定用户和密码,要保存吗?",
"DescURLFormat": "无效的 URL 类型"
"DescURLFormat": "无效的 URL 类型",
"RegistryName": "注册表名称",
"DescRegistryNameIsEmpty": "注册表名称为空",
"RegistryNameAlreadyExists": "注册表名称已存在。\n请更改注册表名称来添加。"
},
"resourceGroup": {
"ResourceGroups": "资源组",
Expand Down
5 changes: 4 additions & 1 deletion resources/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,10 @@
"NoRegistryToDisplay": "无注册表显示",
"ModifyRegistry": "修改注册表",
"ConfirmNoUserName": "未指定用户和密码,要保存吗?",
"DescURLFormat": "無效的 URL 類型"
"DescURLFormat": "無效的 URL 類型",
"RegistryName": "註冊表名稱",
"DescRegistryNameIsEmpty": "註冊表名稱為空",
"RegistryNameAlreadyExists": "註冊表名稱已存在。\n請更改註冊表名稱來新增。"
},
"resourceGroup": {
"ResourceGroups": "資源組",
Expand Down

0 comments on commit 924a6c1

Please sign in to comment.