Skip to content

Commit 95a7828

Browse files
authored
fix(api, cluster/transport): correct i18n and table columns (#109)
1 parent 7c0137b commit 95a7828

6 files changed

Lines changed: 36 additions & 52 deletions

File tree

apps/main/[3]cluster/[2]transport/components/TransportPanel/index.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ export function ExportPanel({ back }: TransportPanelProps) {
6868
const targetOptions = useMemo(
6969
() => (
7070
<>
71-
<Form.Item
72-
name="storageType"
73-
label={t('form.storageType')}
74-
initialValue="nfs"
75-
>
71+
<Form.Item name="storageType" label=" " initialValue="nfs">
7672
<Radio.Group onChange={(e) => setTargetType(e.target.value)}>
7773
<Radio value="nfs">{t('enum.storageType.nfs')}</Radio>
7874
<Radio value="s3">{t('enum.storageType.s3')}</Radio>
@@ -407,11 +403,7 @@ export function ImportPanel({ back }: TransportPanelProps) {
407403

408404
return (
409405
<>
410-
<Form.Item
411-
name="storageType"
412-
label={t('form.storageType')}
413-
initialValue="local"
414-
>
406+
<Form.Item name="storageType" label=" " initialValue="local">
415407
<Radio.Group
416408
onChange={(e) => {
417409
setSourceType(e.target.value)

apps/main/[3]cluster/[2]transport/components/TransportPanel/translations/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum:
4040
db: Database
4141
sql: SQL
4242
storageType:
43-
s3: AWS S3
43+
s3: AWS S3 Compatible Storage
4444
nfs: Shared NFS
4545
local: Local
4646
tips:

apps/main/[3]cluster/[2]transport/components/TransportPanel/translations/zh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum:
4040
db: 库表
4141
sql: SQL
4242
storageType:
43-
s3: AWS S3
43+
s3: AWS S3 兼容存储
4444
nfs: TiEM 共享存储
4545
local: 本地文件
4646
tips:

apps/main/[3]cluster/[2]transport/components/TransportTable/index.tsx

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -147,37 +147,11 @@ function getColumns(
147147
key: 'id',
148148
hideInSearch: true,
149149
},
150-
{
151-
title: t('model:transport.property.clusterId'),
152-
width: 200,
153-
dataIndex: 'clusterId',
154-
key: 'clusterId',
155-
render: (_, record) => (
156-
<Link to={`${resolveRoute('../instances/')}/${record.clusterId}`}>
157-
{record.clusterId}
158-
</Link>
159-
),
160-
},
161-
{
162-
title: t('model:transport.property.startTime'),
163-
width: 150,
164-
dataIndex: 'startTime',
165-
key: 'startTime',
166-
valueType: 'dateTime',
167-
},
168-
{
169-
title: t('model:transport.property.endTime'),
170-
width: 150,
171-
dataIndex: 'endTime',
172-
key: 'endTime',
173-
valueType: 'dateTime',
174-
},
175150
{
176151
title: t('model:transport.property.type'),
177152
width: 80,
178153
dataIndex: 'transportType',
179154
key: 'type',
180-
// transport.status === task.status
181155
hideInSearch: true,
182156
renderText: (_, record) =>
183157
t(`model:transport.type.${record.transportType}`),
@@ -209,11 +183,29 @@ function getColumns(
209183
hideInSearch: true,
210184
},
211185
{
212-
title: t('model:transport.property.fileName'),
213-
width: 160,
214-
dataIndex: 'zipName',
215-
key: 'fileName',
216-
hideInSearch: true,
186+
title: t('model:transport.property.clusterId'),
187+
width: 200,
188+
dataIndex: 'clusterId',
189+
key: 'clusterId',
190+
render: (_, record) => (
191+
<Link to={`${resolveRoute('../instances/')}/${record.clusterId}`}>
192+
{record.clusterId}
193+
</Link>
194+
),
195+
},
196+
{
197+
title: t('model:transport.property.startTime'),
198+
width: 150,
199+
dataIndex: 'startTime',
200+
key: 'startTime',
201+
valueType: 'dateTime',
202+
},
203+
{
204+
title: t('model:transport.property.endTime'),
205+
width: 150,
206+
dataIndex: 'endTime',
207+
key: 'endTime',
208+
valueType: 'dateTime',
217209
},
218210
{
219211
title: t('model:transport.property.filePath'),

src/api/model/translations/en.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,17 +252,17 @@ knowledge:
252252
column-based-storage: Column Storage Component
253253
transport:
254254
property:
255-
id: ID
255+
id: Task ID
256256
status: Status
257-
clusterId: Cluster
257+
clusterId: Cluster ID
258258
startTime: Start Time
259259
endTime: End Time
260-
type: Type
260+
type: Task Type
261261
storageType: Storage
262262
fileName: File Name
263263
filePath: File Path
264264
fileSize: File Size
265-
comment: Comment
265+
comment: Remarks
266266
type:
267267
import: Import
268268
export: Export
@@ -272,5 +272,5 @@ transport:
272272
status:
273273
initializing: Initializing
274274
processing: Processing
275-
success: Success
275+
success: Finished
276276
failed: Failed

src/api/model/translations/zh.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,12 @@ knowledge:
252252
column-based-storage: 列存组件
253253
transport:
254254
property:
255-
id: ID
255+
id: 任务 ID
256256
status: 状态
257257
clusterId: 集群 ID
258258
startTime: 开始时间
259-
endTime: 截至时间
260-
type: 类型
259+
endTime: 结束时间
260+
type: 任务类型
261261
storageType: 存储
262262
fileName: 文件名
263263
filePath: 文件路径
@@ -271,6 +271,6 @@ transport:
271271
s3: AWS S3
272272
status:
273273
initializing: 初始化中
274-
processing: 处理中
274+
processing: 进行中
275275
success: 成功
276276
failed: 失败

0 commit comments

Comments
 (0)