Skip to content

Commit

Permalink
feat: Improve the service list page (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
CH3CHO authored Feb 19, 2025
1 parent 4b112a3 commit 7326219
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
6 changes: 4 additions & 2 deletions frontend/src/locales/en-US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,12 @@
},
"service": {
"columns": {
"name": "Service Name",
"name": "Service Name (FQDN)",
"port": "Port",
"namespace": "Namespace",
"endpoints": "Service Endpoints"
"endpoints": "Endpoints"
},
"name": "Service Name",
"namePlaceholder": "Please input the service name.",
"namespacePlaceholder": "Please input the namespace."
},
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,12 @@
},
"service": {
"columns": {
"name": "服务名称",
"name": "服务名称(FQDN)",
"port": "服务端口",
"namespace": "命名空间",
"endpoints": "服务地址"
},
"name": "服务名称",
"namePlaceholder": "请输入服务名称",
"namespacePlaceholder": "请输入命名空间"
},
Expand Down
15 changes: 12 additions & 3 deletions frontend/src/pages/service/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@ const ServiceList: React.FC = () => {
key: 'name',
width: 350,
ellipsis: true,
render: (_, record) => {
return serviceToString(record);
render: (value) => {
return value || '-';
},
},
{
title: t('service.columns.port'),
dataIndex: 'port',
key: 'port',
width: 100,
render: (value) => {
return value || '-';
},
},
{
Expand Down Expand Up @@ -116,7 +125,7 @@ const ServiceList: React.FC = () => {
<Row gutter={24}>
<Col span={6}>
<Form.Item
label={t('service.columns.name')}
label={t('service.name')}
name="name"
>
<Input
Expand Down

0 comments on commit 7326219

Please sign in to comment.