Skip to content

Commit

Permalink
feat: Expose endpoint and created user in model serving list (#2047)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
gee05053 and yomybaby authored Dec 11, 2023
1 parent 1bafd99 commit edc6b22
Show file tree
Hide file tree
Showing 22 changed files with 64 additions and 21 deletions.
4 changes: 3 additions & 1 deletion react/src/pages/RoutingListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ const RoutingListPage: React.FC<RoutingListPageProps> = () => {
children: endpoint?.url ? (
<Typography.Text copyable>{endpoint?.url}</Typography.Text>
) : (
<Tag>{t('modelService.NoServiceEndpoint')}</Tag>
<Typography.Text type="secondary">
{t('modelService.NoServiceEndpoint')}
</Typography.Text>
),
},
{
Expand Down
21 changes: 21 additions & 0 deletions react/src/pages/ServingListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,18 @@ const ServingListPage: React.FC<PropsWithChildren> = ({ children }) => {
<Typography.Text code>{endpoint_id}</Typography.Text>
),
},
{
title: t('modelService.ServiceEndpoint'),
dataIndex: 'endpoint_id',
render: (endpoint_id, row) =>
row.url ? (
<Typography.Link copyable href={row.url} target="_blank">
{row.url}
</Typography.Link>
) : (
'-'
),
},
{
title: t('modelService.Controls'),
dataIndex: 'controls',
Expand Down Expand Up @@ -345,6 +357,15 @@ const ServingListPage: React.FC<PropsWithChildren> = ({ children }) => {
<EndpointStatusTag endpointFrgmt={row} />
),
},
...(baiClient.is_admin
? [
{
title: t('modelService.Owner'),
dataIndex: 'created_user',
render: (created_user: string) => created_user,
},
]
: []),
{
title: t('modelService.CreatedAt'),
dataIndex: 'created_at',
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,8 @@
"RoutingsCount": "Αριθμός δρομολογίων",
"Active/Total": "Ενεργό/Σύνολο",
"Public": "Δημόσιο",
"YouAreAboutToTerminate": "Πρόκειται να τερματίσετε"
"YouAreAboutToTerminate": "Πρόκειται να τερματίσετε",
"Owner": "Ιδιοκτήτης"
},
"ErrorBoundary": {
"title": "Εμφανίστηκε σφάλμα.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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...",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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...",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,8 @@
"Active/Total": "アクティブ/全体",
"Public": "公開",
"YouAreAboutToTerminate": "以下のサービスを削除しようとします:",
"Image": "イメージ"
"Image": "イメージ",
"Owner": "所有者"
},
"ErrorBoundary": {
"title": "エラーが発生しました。",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@
"ServiceNameRule": "4~24자의 영문, 숫자, 밑줄(_), 하이픈(-), 마침표(.)만 허용하며, 영문으로 영문이나 숫자로 끝나야합니다.",
"FormValidationFailed": "양식 유효성 검사 실패",
"resources": "자원",
"Image": "이미지"
"Image": "이미지",
"Owner": "소유자"
},
"button": {
"Cancel": "취소",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/mn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,8 @@
"FormValidationFailed": "Маягтын баталгаажуулалт амжилтгүй боллоо",
"ServiceNameRule": "Зөвхөн 4-24 үсэг тоо, доогуур зураас(_), зураас(-), цэг(.) оруулахыг зөвшөөрөх ба энэ нь үсэг, тоон тэмдэгтээр төгсөх ёстой.",
"resources": "Нөөц",
"Image": "Зураг"
"Image": "Зураг",
"Owner": "Эзэмшигч"
},
"ErrorBoundary": {
"title": "Алдаа гарсан байна.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ms.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,8 @@
"FormValidationFailed": "Не удалось выполнить валидацию формы",
"ServiceNameRule": "Допускается только от 4 до 24 буквенно-цифровых символов, символов подчеркивания (_), дефиса (-) и точки(.), и он должен заканчиваться буквенно-цифровым символом.",
"resources": "Ресурсы",
"Image": "Изображение"
"Image": "Изображение",
"Owner": "Владелец"
},
"ErrorBoundary": {
"title": "Произошла ошибка.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,8 @@
"Active/Total": "活动/总数",
"Public": "公众",
"YouAreAboutToTerminate": "您即将终止",
"Image": "图片"
"Image": "图片",
"Owner": "所有者"
},
"totp": {
"TotpSetupCompleted": "已启用 2FA",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,8 @@
"Active/Total": "活动/总数",
"Public": "公众",
"YouAreAboutToTerminate": "您即将终止",
"Image": "图片"
"Image": "图片",
"Owner": "擁有者"
},
"totp": {
"TotpSetupCompleted": "已启用 2FA",
Expand Down

0 comments on commit edc6b22

Please sign in to comment.