From edc6b22969844dace4bb2fe7804b47ae0559b49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=91=EC=A1=B0=28ByeongJo=20Kim=29?= Date: Mon, 11 Dec 2023 21:24:55 +0900 Subject: [PATCH] feat: Expose endpoint and created user in model serving list (#2047) * Add column endpoint url * Add created_user column * Apply i18n * fix:change Typography.Text to Typography.Link * fix:remove unused import * remove `Tag` from service endpoint description in RoutingListPage --------- Co-authored-by: Jong Eun Lee --- react/src/pages/RoutingListPage.tsx | 4 +++- react/src/pages/ServingListPage.tsx | 21 +++++++++++++++++++++ resources/i18n/de.json | 3 ++- resources/i18n/el.json | 3 ++- resources/i18n/en.json | 3 ++- resources/i18n/es.json | 3 ++- resources/i18n/fi.json | 3 ++- resources/i18n/fr.json | 3 ++- resources/i18n/id.json | 3 ++- resources/i18n/it.json | 3 ++- resources/i18n/ja.json | 3 ++- resources/i18n/ko.json | 3 ++- resources/i18n/mn.json | 3 ++- resources/i18n/ms.json | 3 ++- resources/i18n/pl.json | 3 ++- resources/i18n/pt-BR.json | 3 ++- resources/i18n/pt.json | 3 ++- resources/i18n/ru.json | 3 ++- resources/i18n/tr.json | 3 ++- resources/i18n/vi.json | 3 ++- resources/i18n/zh-CN.json | 3 ++- resources/i18n/zh-TW.json | 3 ++- 22 files changed, 64 insertions(+), 21 deletions(-) diff --git a/react/src/pages/RoutingListPage.tsx b/react/src/pages/RoutingListPage.tsx index cbfd97a357..d7f4755940 100644 --- a/react/src/pages/RoutingListPage.tsx +++ b/react/src/pages/RoutingListPage.tsx @@ -311,7 +311,9 @@ const RoutingListPage: React.FC = () => { children: endpoint?.url ? ( {endpoint?.url} ) : ( - {t('modelService.NoServiceEndpoint')} + + {t('modelService.NoServiceEndpoint')} + ), }, { diff --git a/react/src/pages/ServingListPage.tsx b/react/src/pages/ServingListPage.tsx index 136e6f5c78..5728ee54f8 100644 --- a/react/src/pages/ServingListPage.tsx +++ b/react/src/pages/ServingListPage.tsx @@ -288,6 +288,18 @@ const ServingListPage: React.FC = ({ children }) => { {endpoint_id} ), }, + { + title: t('modelService.ServiceEndpoint'), + dataIndex: 'endpoint_id', + render: (endpoint_id, row) => + row.url ? ( + + {row.url} + + ) : ( + '-' + ), + }, { title: t('modelService.Controls'), dataIndex: 'controls', @@ -345,6 +357,15 @@ const ServingListPage: React.FC = ({ children }) => { ), }, + ...(baiClient.is_admin + ? [ + { + title: t('modelService.Owner'), + dataIndex: 'created_user', + render: (created_user: string) => created_user, + }, + ] + : []), { title: t('modelService.CreatedAt'), dataIndex: 'created_at', diff --git a/resources/i18n/de.json b/resources/i18n/de.json index 9f8c475c9e..f33006e63f 100644 --- a/resources/i18n/de.json +++ b/resources/i18n/de.json @@ -1394,7 +1394,8 @@ "RoutingsCount": "Routings zählen", "Active/Total": "Aktiv/Gesamt", "Public": "Öffentlich", - "YouAreAboutToTerminate": "Sie stehen kurz vor der Beendigung" + "YouAreAboutToTerminate": "Sie stehen kurz vor der Beendigung", + "Owner": "Eigentümer" }, "ErrorBoundary": { "title": "Es ist ein Fehler aufgetreten.", diff --git a/resources/i18n/el.json b/resources/i18n/el.json index 615b0f782a..07c6d9dcb7 100644 --- a/resources/i18n/el.json +++ b/resources/i18n/el.json @@ -1394,7 +1394,8 @@ "RoutingsCount": "Αριθμός δρομολογίων", "Active/Total": "Ενεργό/Σύνολο", "Public": "Δημόσιο", - "YouAreAboutToTerminate": "Πρόκειται να τερματίσετε" + "YouAreAboutToTerminate": "Πρόκειται να τερματίσετε", + "Owner": "Ιδιοκτήτης" }, "ErrorBoundary": { "title": "Εμφανίστηκε σφάλμα.", diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 3ac38762fc..bc89f40b7b 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -429,7 +429,8 @@ "ServiceNameRule": "Only allow 4 to 24 characters of alphanumeric, underscore(_), hyphen(-), and period(.) and it must end with an alphanumeric character.", "FormValidationFailed": "Form validation failed", "resources": "Resources", - "Image": "Image" + "Image": "Image", + "Owner": "Owner" }, "button": { "Cancel": "Cancel", diff --git a/resources/i18n/es.json b/resources/i18n/es.json index efd6a418c1..265131cc26 100644 --- a/resources/i18n/es.json +++ b/resources/i18n/es.json @@ -716,7 +716,8 @@ "TokenGenerationFailed": "Generación de token fallida. Por favor, inténtelo de nuevo.", "TrafficRatio": "Ratio de tráfico", "YouAreAboutToTerminate": "Está a punto de terminar", - "resources": "Recursos" + "resources": "Recursos", + "Owner": "Dueño" }, "notification": { "Initializing": "Inicializando...", diff --git a/resources/i18n/fi.json b/resources/i18n/fi.json index 6713099a52..861ab675fd 100644 --- a/resources/i18n/fi.json +++ b/resources/i18n/fi.json @@ -716,7 +716,8 @@ "TokenGenerationFailed": "Tokenin luominen epäonnistui. yritä uudelleen.", "TrafficRatio": "Liikennesuhde", "YouAreAboutToTerminate": "Olet lopettamassa", - "resources": "Resurssit" + "resources": "Resurssit", + "Owner": "Omistaja" }, "notification": { "Initializing": "Aloitetaan...", diff --git a/resources/i18n/fr.json b/resources/i18n/fr.json index 21d94c18f0..fa24fde0f1 100644 --- a/resources/i18n/fr.json +++ b/resources/i18n/fr.json @@ -1443,7 +1443,8 @@ "FormValidationFailed": "La validation du formulaire a échoué", "ServiceNameRule": "Seuls 4 à 24 caractères alphanumériques, le trait de soulignement (_), le trait d'union (-) et le point (.) sont autorisés et le texte doit se terminer par un caractère alphanumérique.", "resources": "Ressources", - "Image": "Image" + "Image": "Image", + "Owner": "Propriétaire" }, "ErrorBoundary": { "title": "Une erreur s'est produite.", diff --git a/resources/i18n/id.json b/resources/i18n/id.json index cc1124477c..bc0e519cff 100644 --- a/resources/i18n/id.json +++ b/resources/i18n/id.json @@ -1443,7 +1443,8 @@ "FormValidationFailed": "Validasi formulir gagal", "ServiceNameRule": "Hanya mengizinkan 4 hingga 24 karakter alfanumerik, garis bawah (_), tanda hubung (-), dan titik (.) dan harus diakhiri dengan karakter alfanumerik.", "resources": "Sumber daya", - "Image": "Gambar" + "Image": "Gambar", + "Owner": "Pemilik" }, "ErrorBoundary": { "title": "Telah terjadi kesalahan.", diff --git a/resources/i18n/it.json b/resources/i18n/it.json index fd63cc5398..885d2672b1 100644 --- a/resources/i18n/it.json +++ b/resources/i18n/it.json @@ -1394,7 +1394,8 @@ "RoutingsCount": "Conteggio delle rotte", "Active/Total": "Attivo/Totale", "Public": "Pubblico", - "YouAreAboutToTerminate": "State per terminare" + "YouAreAboutToTerminate": "State per terminare", + "Owner": "Proprietario" }, "ErrorBoundary": { "title": "Si è verificato un errore.", diff --git a/resources/i18n/ja.json b/resources/i18n/ja.json index a7855d7565..be8cb47560 100644 --- a/resources/i18n/ja.json +++ b/resources/i18n/ja.json @@ -1394,7 +1394,8 @@ "Active/Total": "アクティブ/全体", "Public": "公開", "YouAreAboutToTerminate": "以下のサービスを削除しようとします:", - "Image": "イメージ" + "Image": "イメージ", + "Owner": "所有者" }, "ErrorBoundary": { "title": "エラーが発生しました。", diff --git a/resources/i18n/ko.json b/resources/i18n/ko.json index 605b202c4e..0a6a8619bf 100644 --- a/resources/i18n/ko.json +++ b/resources/i18n/ko.json @@ -418,7 +418,8 @@ "ServiceNameRule": "4~24자의 영문, 숫자, 밑줄(_), 하이픈(-), 마침표(.)만 허용하며, 영문으로 영문이나 숫자로 끝나야합니다.", "FormValidationFailed": "양식 유효성 검사 실패", "resources": "자원", - "Image": "이미지" + "Image": "이미지", + "Owner": "소유자" }, "button": { "Cancel": "취소", diff --git a/resources/i18n/mn.json b/resources/i18n/mn.json index d5486bd8da..d5185df47f 100644 --- a/resources/i18n/mn.json +++ b/resources/i18n/mn.json @@ -1443,7 +1443,8 @@ "FormValidationFailed": "Маягтын баталгаажуулалт амжилтгүй боллоо", "ServiceNameRule": "Зөвхөн 4-24 үсэг тоо, доогуур зураас(_), зураас(-), цэг(.) оруулахыг зөвшөөрөх ба энэ нь үсэг, тоон тэмдэгтээр төгсөх ёстой.", "resources": "Нөөц", - "Image": "Зураг" + "Image": "Зураг", + "Owner": "Эзэмшигч" }, "ErrorBoundary": { "title": "Алдаа гарсан байна.", diff --git a/resources/i18n/ms.json b/resources/i18n/ms.json index 318510f2d7..91917af603 100644 --- a/resources/i18n/ms.json +++ b/resources/i18n/ms.json @@ -1434,7 +1434,8 @@ "RoutingsCount": "Kiraan Laluan", "Active/Total": "Aktif/Jumlah", "Public": "Awam", - "YouAreAboutToTerminate": "Anda akan menamatkan perkhidmatan" + "YouAreAboutToTerminate": "Anda akan menamatkan perkhidmatan", + "Owner": "Pemilik" }, "totp": { "TotpSetupCompleted": "Didayakan 2FA", diff --git a/resources/i18n/pl.json b/resources/i18n/pl.json index 718d07e34c..b8d0cd6283 100644 --- a/resources/i18n/pl.json +++ b/resources/i18n/pl.json @@ -1394,7 +1394,8 @@ "RoutingsCount": "Liczba tras", "Active/Total": "Aktywny/Ogółem", "Public": "Publiczny", - "YouAreAboutToTerminate": "Zamierzasz zakończyć" + "YouAreAboutToTerminate": "Zamierzasz zakończyć", + "Owner": "Właściciel" }, "ErrorBoundary": { "title": "Wystąpił błąd.", diff --git a/resources/i18n/pt-BR.json b/resources/i18n/pt-BR.json index 2e4f8069c2..cc011ab313 100644 --- a/resources/i18n/pt-BR.json +++ b/resources/i18n/pt-BR.json @@ -1434,7 +1434,8 @@ "RoutingsCount": "Contagem de rotas", "Active/Total": "Ativo/Total", "Public": "Público", - "YouAreAboutToTerminate": "Está prestes a terminar" + "YouAreAboutToTerminate": "Está prestes a terminar", + "Owner": "Proprietário" }, "totp": { "TotpSetupCompleted": "Ativado 2FA", diff --git a/resources/i18n/pt.json b/resources/i18n/pt.json index 69ca60a0dd..6fd7453984 100644 --- a/resources/i18n/pt.json +++ b/resources/i18n/pt.json @@ -1434,7 +1434,8 @@ "Active/Total": "Ativo/Total", "Public": "Público", "YouAreAboutToTerminate": "Está prestes a terminar", - "Image": "Imagem" + "Image": "Imagem", + "Owner": "Proprietário" }, "totp": { "TotpSetupCompleted": "Ativado 2FA", diff --git a/resources/i18n/ru.json b/resources/i18n/ru.json index aa9eb73575..122fa29831 100644 --- a/resources/i18n/ru.json +++ b/resources/i18n/ru.json @@ -1443,7 +1443,8 @@ "FormValidationFailed": "Не удалось выполнить валидацию формы", "ServiceNameRule": "Допускается только от 4 до 24 буквенно-цифровых символов, символов подчеркивания (_), дефиса (-) и точки(.), и он должен заканчиваться буквенно-цифровым символом.", "resources": "Ресурсы", - "Image": "Изображение" + "Image": "Изображение", + "Owner": "Владелец" }, "ErrorBoundary": { "title": "Произошла ошибка.", diff --git a/resources/i18n/tr.json b/resources/i18n/tr.json index 854e572669..d5bb583a60 100644 --- a/resources/i18n/tr.json +++ b/resources/i18n/tr.json @@ -1394,7 +1394,8 @@ "RoutingsCount": "Güzergah Sayısı", "Active/Total": "Aktif/Toplam", "Public": "Kamu", - "YouAreAboutToTerminate": "Sonlandırmak üzeresiniz" + "YouAreAboutToTerminate": "Sonlandırmak üzeresiniz", + "Owner": "Mal sahibi" }, "ErrorBoundary": { "title": "Bir hata oluştu.", diff --git a/resources/i18n/vi.json b/resources/i18n/vi.json index 8ae00afd7a..9843697da1 100644 --- a/resources/i18n/vi.json +++ b/resources/i18n/vi.json @@ -1434,7 +1434,8 @@ "RoutingsCount": "Số lượng định tuyến", "Active/Total": "Đang hoạt động/Tổng cộng", "Public": "Công cộng", - "YouAreAboutToTerminate": "Bạn sắp chấm dứt" + "YouAreAboutToTerminate": "Bạn sắp chấm dứt", + "Owner": "Người sở hữu" }, "totp": { "TotpSetupCompleted": "Đã bật 2FA", diff --git a/resources/i18n/zh-CN.json b/resources/i18n/zh-CN.json index 910958acc1..cff24c2109 100644 --- a/resources/i18n/zh-CN.json +++ b/resources/i18n/zh-CN.json @@ -1434,7 +1434,8 @@ "Active/Total": "活动/总数", "Public": "公众", "YouAreAboutToTerminate": "您即将终止", - "Image": "图片" + "Image": "图片", + "Owner": "所有者" }, "totp": { "TotpSetupCompleted": "已启用 2FA", diff --git a/resources/i18n/zh-TW.json b/resources/i18n/zh-TW.json index 07dcd8d485..889cf5fa29 100644 --- a/resources/i18n/zh-TW.json +++ b/resources/i18n/zh-TW.json @@ -1434,7 +1434,8 @@ "Active/Total": "活动/总数", "Public": "公众", "YouAreAboutToTerminate": "您即将终止", - "Image": "图片" + "Image": "图片", + "Owner": "擁有者" }, "totp": { "TotpSetupCompleted": "已启用 2FA",