From 90dcd5f64b464b250cf7365b74237fdaeadd700a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=B4=E6=99=96?= <2689991790@qq.com>
Date: Tue, 5 Mar 2024 16:24:07 +0800
Subject: [PATCH 1/2] fix:Optimize UI
---
ui/mock/tenantAPI.ts | 6 +-
ui/src/components/MonitorComp/index.tsx | 5 +-
.../components/MonitorDetail/DataFilter.tsx | 32 ++--
ui/src/components/TopoComponent/index.tsx | 2 +-
ui/src/pages/Cluster/ClusterList.tsx | 7 +-
.../Cluster/Detail/Overview/BasicInfo.tsx | 7 +-
.../Cluster/Detail/Overview/ServerTable.tsx | 7 +-
.../Cluster/Detail/Overview/ZoneTable.tsx | 7 +-
ui/src/pages/Cluster/Detail/Tenant/index.tsx | 20 +--
.../Detail/Backup/BackupConfiguration.tsx | 6 +-
.../pages/Tenant/Detail/Backup/BackupJobs.tsx | 10 +-
.../pages/Tenant/Detail/Backup/JobTable.tsx | 148 +++++++++---------
.../NewBackup/AdvancedConfiguration.tsx | 6 +-
.../pages/Tenant/Detail/NewBackup/index.tsx | 29 ++--
.../pages/Tenant/Detail/Overview/Backups.tsx | 7 +-
.../Tenant/Detail/Overview/BasicInfo.tsx | 85 +++++-----
.../pages/Tenant/Detail/Overview/Replicas.tsx | 7 +-
ui/src/pages/Tenant/Detail/Overview/index.tsx | 1 -
ui/src/pages/Tenant/Detail/Topo/index.tsx | 6 +-
ui/src/pages/Tenant/TenantsList.tsx | 7 +-
ui/src/services/tenant.ts | 11 +-
ui/src/services/typings.d.ts | 24 +--
22 files changed, 213 insertions(+), 227 deletions(-)
diff --git a/ui/mock/tenantAPI.ts b/ui/mock/tenantAPI.ts
index 821d23d1e..a0a562dfb 100644
--- a/ui/mock/tenantAPI.ts
+++ b/ui/mock/tenantAPI.ts
@@ -76,12 +76,12 @@ export default {
bakDataPath: 'string',
bakEncryptionSecret: 'string',
destType: 'string',
- jobKeepWindow: 'string',
+ jobKeepDays: 'string',
name: 'string',
namespace: 'string',
ossAccessSecret: 'string',
- pieceInterval: 'string',
- recoveryWindow: 'string',
+ pieceIntervalDays: 'string',
+ recoveryDays: 'string',
scheduleDates: [
{
backupType: 'typea',
diff --git a/ui/src/components/MonitorComp/index.tsx b/ui/src/components/MonitorComp/index.tsx
index 0155e0e98..ba1a5af56 100644
--- a/ui/src/components/MonitorComp/index.tsx
+++ b/ui/src/components/MonitorComp/index.tsx
@@ -1,5 +1,4 @@
import { QuestionCircleOutlined } from '@ant-design/icons';
-import { ProCard } from '@ant-design/pro-components';
import { useRequest } from 'ahooks';
import { Card,Col,Row,Tooltip } from 'antd';
import { useState } from 'react';
@@ -78,7 +77,7 @@ export default function MonitorComp({
{allMetrics &&
allMetrics.map((container: any, index: number) => (
-
+
{type === 'OVERVIEW' ? (
@@ -148,7 +147,7 @@ export default function MonitorComp({
)}
-
+
))}
{/* {
- return server.zone === val;
- });
+ const filterServers = filterData.serverList.filter(
+ (server: OptionType) => {
+ return server.zone === val;
+ },
+ );
setServerOption(filterServers);
}
};
@@ -309,9 +310,8 @@ export default function DataFilter({
}, [dateValue]);
return (
-
-
+
);
}
diff --git a/ui/src/components/TopoComponent/index.tsx b/ui/src/components/TopoComponent/index.tsx
index bba5e98c3..93a3a77e9 100644
--- a/ui/src/components/TopoComponent/index.tsx
+++ b/ui/src/components/TopoComponent/index.tsx
@@ -285,7 +285,7 @@ export default function TopoComponent({
? header
: originTopoData && (
)}
diff --git a/ui/src/pages/Cluster/ClusterList.tsx b/ui/src/pages/Cluster/ClusterList.tsx
index 7ca5c1d1a..7aaae6226 100644
--- a/ui/src/pages/Cluster/ClusterList.tsx
+++ b/ui/src/pages/Cluster/ClusterList.tsx
@@ -1,8 +1,7 @@
import { intl } from '@/utils/intl';
-import { ProCard } from '@ant-design/pro-components';
import { Pie } from '@antv/g2plot';
import { Link } from '@umijs/max';
-import { Button, Col, Table, Tag } from 'antd';
+import { Button, Col, Table, Tag, Card } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import { COLOR_MAP } from '@/constants';
@@ -167,7 +166,7 @@ export default function ClusterList({
}: ClusterListProps) {
return (
-
+
{intl.formatMessage({
@@ -191,7 +190,7 @@ export default function ClusterList({
bordered
sticky
/>
-
+
);
}
diff --git a/ui/src/pages/Cluster/Detail/Overview/BasicInfo.tsx b/ui/src/pages/Cluster/Detail/Overview/BasicInfo.tsx
index 058a96f89..551491407 100644
--- a/ui/src/pages/Cluster/Detail/Overview/BasicInfo.tsx
+++ b/ui/src/pages/Cluster/Detail/Overview/BasicInfo.tsx
@@ -1,7 +1,6 @@
import { COLOR_MAP } from '@/constants';
import { intl } from '@/utils/intl';
-import { ProCard } from '@ant-design/pro-components';
-import { Col, Descriptions, Tag } from 'antd';
+import { Col, Descriptions, Tag, Card } from 'antd';
interface BasicInfoProps {
name: string;
@@ -20,7 +19,7 @@ export default function BasicInfo({
}: BasicInfoProps) {
return (
-
+
{status}
-
+
);
}
diff --git a/ui/src/pages/Cluster/Detail/Overview/ServerTable.tsx b/ui/src/pages/Cluster/Detail/Overview/ServerTable.tsx
index c0271ad70..62b547661 100644
--- a/ui/src/pages/Cluster/Detail/Overview/ServerTable.tsx
+++ b/ui/src/pages/Cluster/Detail/Overview/ServerTable.tsx
@@ -1,6 +1,5 @@
import { intl } from '@/utils/intl';
-import { ProCard } from '@ant-design/pro-components';
-import { Col, Table, Tag } from 'antd';
+import { Col, Table, Tag, Card } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import { COLOR_MAP } from '@/constants';
@@ -97,7 +96,7 @@ const getServerColums = () => {
export default function ServerTable({ servers }: { servers: API.Server[] }) {
return (
-
+
-
+
);
}
diff --git a/ui/src/pages/Cluster/Detail/Overview/ZoneTable.tsx b/ui/src/pages/Cluster/Detail/Overview/ZoneTable.tsx
index 7b7f0929a..f6b90045e 100644
--- a/ui/src/pages/Cluster/Detail/Overview/ZoneTable.tsx
+++ b/ui/src/pages/Cluster/Detail/Overview/ZoneTable.tsx
@@ -1,6 +1,5 @@
import { intl } from '@/utils/intl'; //@ts-nocheck
-import { ProCard } from '@ant-design/pro-components';
-import { Col, Table, Tag, message } from 'antd';
+import { Col, Table, Tag, message, Card } from 'antd';
import type { ColumnType } from 'antd/es/table';
import showDeleteConfirm from '@/components/customModal/DeleteModal';
@@ -141,14 +140,14 @@ export default function ZoneTable({
};
return (
-
+
-
+
);
}
diff --git a/ui/src/pages/Cluster/Detail/Tenant/index.tsx b/ui/src/pages/Cluster/Detail/Tenant/index.tsx
index 2f08090f7..38bddc52d 100644
--- a/ui/src/pages/Cluster/Detail/Tenant/index.tsx
+++ b/ui/src/pages/Cluster/Detail/Tenant/index.tsx
@@ -6,7 +6,7 @@ import { getAllTenants } from '@/services/tenant';
import { PageContainer } from '@ant-design/pro-components';
import { useNavigate } from '@umijs/max';
import { useRequest } from 'ahooks';
-import { Row } from 'antd';
+import { Col,Row } from 'antd';
import BasicInfo from '../Overview/BasicInfo';
import { getNSName } from '../Overview/helper';
@@ -47,14 +47,16 @@ export default function Tenant() {
)}
{tenantsList && (
-
+
+
+
)}
diff --git a/ui/src/pages/Tenant/Detail/Backup/BackupConfiguration.tsx b/ui/src/pages/Tenant/Detail/Backup/BackupConfiguration.tsx
index da4921a55..cfa8ca6ae 100644
--- a/ui/src/pages/Tenant/Detail/Backup/BackupConfiguration.tsx
+++ b/ui/src/pages/Tenant/Detail/Backup/BackupConfiguration.tsx
@@ -94,15 +94,15 @@ export default function BackupConfiguration({
};
}
const DATE_CONFIG = {
- jobKeepWindow: intl.formatMessage({
+ jobKeepDays: intl.formatMessage({
id: 'Dashboard.Detail.Backup.BackupConfiguration.BackupTaskRetention',
defaultMessage: '备份任务保留',
}),
- recoveryWindow: intl.formatMessage({
+ recoveryDays: intl.formatMessage({
id: 'Dashboard.Detail.Backup.BackupConfiguration.DataRecoveryWindow',
defaultMessage: '数据恢复窗口',
}),
- pieceInterval: intl.formatMessage({
+ pieceIntervalDays: intl.formatMessage({
id: 'Dashboard.Detail.Backup.BackupConfiguration.ArchiveSliceInterval',
defaultMessage: '归档切片间隔',
}),
diff --git a/ui/src/pages/Tenant/Detail/Backup/BackupJobs.tsx b/ui/src/pages/Tenant/Detail/Backup/BackupJobs.tsx
index 6b4034fc2..5131c9486 100644
--- a/ui/src/pages/Tenant/Detail/Backup/BackupJobs.tsx
+++ b/ui/src/pages/Tenant/Detail/Backup/BackupJobs.tsx
@@ -28,7 +28,7 @@ export default function BackupJobs() {
id: 'Dashboard.Detail.Backup.BackupJobs.FullBackup',
defaultMessage: '全量备份',
}),
- children: ,
+ children: ,
},
{
key: 'INCR',
@@ -36,7 +36,7 @@ export default function BackupJobs() {
id: 'Dashboard.Detail.Backup.BackupJobs.IncrementalBackup',
defaultMessage: '增量备份',
}),
- children: ,
+ children: ,
},
{
key: 'ARCHIVE',
@@ -44,7 +44,7 @@ export default function BackupJobs() {
id: 'Dashboard.Detail.Backup.BackupJobs.LogArchiving',
defaultMessage: '日志归档',
}),
- children: ,
+ children: ,
},
{
key: 'CLEAN',
@@ -52,8 +52,8 @@ export default function BackupJobs() {
id: 'Dashboard.Detail.Backup.BackupJobs.DataCleansing',
defaultMessage: '数据清理',
}),
- children: ,
- },
+ children: ,
+ },
];
return (
diff --git a/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx b/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx
index 5fe388793..37f04670f 100644
--- a/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx
+++ b/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx
@@ -4,85 +4,81 @@ import { Table, Tooltip } from 'antd';
interface JobTableProps {
dataSource: API.BackupJob[];
+ curSelect: API.JobType;
}
-const columns: TableProps['columns'] = [
- {
- title: 'name',
- dataIndex: 'name',
- key: 'name',
- ellipsis: true,
- render: (value) => {
- return (
-
- {value}
-
- );
+const getColumns = (
+ curSelect: API.JobType,
+): TableProps['columns'] => {
+ return [
+ {
+ title: '任务名称',
+ dataIndex: 'name',
+ key: 'name',
+ ellipsis: true,
+ render: (value) => {
+ return (
+
+ {value}
+
+ );
+ },
},
- },
- {
- title: 'path',
- dataIndex: 'path',
- key: 'path',
- ellipsis: true,
- render: (value) => {
- return (
-
- {value}
-
- );
+ {
+ title: intl.formatMessage({
+ id: 'Dashboard.Detail.Backup.JobTable.StartTime',
+ defaultMessage: '开始时间',
+ }),
+ dataIndex: 'startTime',
+ key: 'startTime',
},
- },
- {
- title: intl.formatMessage({
- id: 'Dashboard.Detail.Backup.JobTable.Status',
- defaultMessage: '状态',
- }),
- dataIndex: 'status',
- key: 'status',
- },
- {
- title: intl.formatMessage({
- id: 'Dashboard.Detail.Backup.JobTable.Status',
- defaultMessage: '状态',
- }),
- dataIndex: 'status',
- key: 'status',
- },
- {
- title: intl.formatMessage({
- id: 'Dashboard.Detail.Backup.JobTable.DatabaseStatus',
- defaultMessage: '数据库状态',
- }),
- dataIndex: 'statusInDatabase',
- key: 'statusInDatabase',
- },
- {
- title: intl.formatMessage({
- id: 'Dashboard.Detail.Backup.JobTable.Type',
- defaultMessage: '类型',
- }),
- dataIndex: 'type',
- key: 'type',
- },
- {
- title: intl.formatMessage({
- id: 'Dashboard.Detail.Backup.JobTable.EncryptedPassword',
- defaultMessage: '加密密码',
- }),
- dataIndex: 'encryptionSecret',
- key: 'encryptionSecret',
- },
- {
- title: intl.formatMessage({
- id: 'Dashboard.Detail.Backup.JobTable.StartTime',
- defaultMessage: '开始时间',
- }),
- dataIndex: 'startTime',
- key: 'startTime',
- },
-];
+ {
+ title: curSelect === 'ARCHIVE' ? '截止时间' : '结束时间',
+ dataIndex: 'endTime',
+ key: 'endTime',
+ },
+ {
+ title: '路径',
+ dataIndex: 'path',
+ key: 'path',
+ ellipsis: true,
+ render: (value) => {
+ return (
+
+ {value}
+
+ );
+ },
+ },
+ {
+ title: '资源状态',
+ dataIndex: 'status',
+ key: 'status',
+ },
+ {
+ title: '任务状态',
+ dataIndex: 'statusInDatabase',
+ key: 'statusInDatabase',
+ },
+ // {
+ // title: intl.formatMessage({
+ // id: 'Dashboard.Detail.Backup.JobTable.Type',
+ // defaultMessage: '类型',
+ // }),
+ // dataIndex: 'type',
+ // key: 'type',
+ // },
+ // {
+ // title: intl.formatMessage({
+ // id: 'Dashboard.Detail.Backup.JobTable.EncryptedPassword',
+ // defaultMessage: '加密密码',
+ // }),
+ // dataIndex: 'encryptionSecret',
+ // key: 'encryptionSecret',
+ // },
+ ];
+};
-export default function JobTable({ dataSource }: JobTableProps) {
- return ;
+export default function JobTable({ dataSource, curSelect }: JobTableProps) {
+ return ;
}
diff --git a/ui/src/pages/Tenant/Detail/NewBackup/AdvancedConfiguration.tsx b/ui/src/pages/Tenant/Detail/NewBackup/AdvancedConfiguration.tsx
index 03854babc..496c0035f 100644
--- a/ui/src/pages/Tenant/Detail/NewBackup/AdvancedConfiguration.tsx
+++ b/ui/src/pages/Tenant/Detail/NewBackup/AdvancedConfiguration.tsx
@@ -100,7 +100,7 @@ export default function AdvancedConfiguration({
}),
},
]}
- name={['jobKeepWindow']}
+ name={['jobKeepDays']}
>
@@ -130,14 +130,14 @@ export default function AdvancedConfiguration({
}),
},
]}
- name={['recoveryWindow']}
+ name={['recoveryDays']}
>
)}
,
]}
>
- {tenantDetail && (
-
- )}
-
} collapsible key={index}>
+
replicas} collapsible key={index}>
{Object.keys(replica).map((key, idx) => (
{replica[key]}
))}
-
+
))}
);
diff --git a/ui/src/pages/Tenant/Detail/Overview/index.tsx b/ui/src/pages/Tenant/Detail/Overview/index.tsx
index 27c00719c..bbbbff8ec 100644
--- a/ui/src/pages/Tenant/Detail/Overview/index.tsx
+++ b/ui/src/pages/Tenant/Detail/Overview/index.tsx
@@ -223,7 +223,6 @@ export default function TenantOverview() {
diff --git a/ui/src/pages/Tenant/Detail/Topo/index.tsx b/ui/src/pages/Tenant/Detail/Topo/index.tsx
index 4805a74c8..8b4003d0d 100644
--- a/ui/src/pages/Tenant/Detail/Topo/index.tsx
+++ b/ui/src/pages/Tenant/Detail/Topo/index.tsx
@@ -1,5 +1,5 @@
-import { getNSName } from '@/pages/Cluster/Detail/Overview/helper';
import TopoComponent from '@/components/TopoComponent';
+import { getNSName } from '@/pages/Cluster/Detail/Overview/helper';
import { getTenant } from '@/services/tenant';
import { useRequest } from 'ahooks';
import BasicInfo from '../Overview/BasicInfo';
@@ -10,7 +10,7 @@ export default function Topo() {
defaultParams: [{ ns, name }],
});
const tenantTopoData = tenantResponse?.data;
-
+
return (
{tenantTopoData && (
@@ -22,7 +22,7 @@ export default function Topo() {
}
/>
diff --git a/ui/src/pages/Tenant/TenantsList.tsx b/ui/src/pages/Tenant/TenantsList.tsx
index da1786e2a..9188e96f0 100644
--- a/ui/src/pages/Tenant/TenantsList.tsx
+++ b/ui/src/pages/Tenant/TenantsList.tsx
@@ -1,7 +1,6 @@
import { intl } from '@/utils/intl';
-import { ProCard } from '@ant-design/pro-components';
import { Link } from '@umijs/max';
-import { Button, Col, Table, Tag } from 'antd';
+import { Button, Col, Table, Tag, Card } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import { COLOR_MAP } from '@/constants';
@@ -94,7 +93,7 @@ export default function TenantsList({
}: TenantsListProps) {
return (
-
+
{intl.formatMessage({
@@ -118,7 +117,7 @@ export default function TenantsList({
bordered
sticky
/>
-
+
);
}
diff --git a/ui/src/services/tenant.ts b/ui/src/services/tenant.ts
index 5f7f3acae..fed67eb1a 100644
--- a/ui/src/services/tenant.ts
+++ b/ui/src/services/tenant.ts
@@ -119,9 +119,9 @@ export async function getBackupPolicy({
'status',
'ossAccessSecret',
'bakEncryptionSecret',
- 'jobKeepWindow',
- 'pieceInterval',
- 'recoveryWindow'
+ 'jobKeepDays',
+ 'pieceIntervalDays',
+ 'recoveryDays'
];
if (r.successful) {
@@ -137,13 +137,14 @@ export async function getBackupJobs({
ns,
name,
type,
- limit = 10,
+ limit
}: API.NamespaceAndName & {
type: API.JobType;
limit?: number;
}): Promise {
+ let limitQuery = limit ? `?limit=${limit}` : '';
let r = await request(
- `${tenantPrefix}/${ns}/${name}/backup/${type}/jobs?limit=${limit}`,
+ `${tenantPrefix}/${ns}/${name}/backup/${type}/jobs${limitQuery}`,
);
let res: API.BackupJob[] = [];
if (r.successful) {
diff --git a/ui/src/services/typings.d.ts b/ui/src/services/typings.d.ts
index b45f19558..4325fa191 100644
--- a/ui/src/services/typings.d.ts
+++ b/ui/src/services/typings.d.ts
@@ -235,20 +235,20 @@ declare namespace API {
bakDataPath: string;
bakEncryptionPassword?: string;
destType: DestType;
- jobKeepWindow?: number;
+ jobKeepDays?: number;
ossAccessId: string;
ossAccessKey: string;
- pieceInterval?: number;
- recoveryWindow?: number;
+ pieceIntervalDays?: number;
+ recoveryDays?: number;
scheduleDates: ScheduleDatesType;
scheduleTime: string;
scheduleType: 'Weekly' | 'Monthly';
};
type UpdateTenantPolicy = {
- jobKeepWindow?: number;
- pieceInterval?: number;
- recoveryWindow?: number;
+ jobKeepDays?: number;
+ pieceIntervalDays?: number;
+ recoveryDays?: number;
scheduleDates?: ScheduleDatesType;
scheduleType?: 'Weekly' | 'Monthly';
status?: string;
@@ -300,12 +300,12 @@ declare namespace API {
bakDataPath: string;
bakEncryptionSecret: string;
destType: DestType;
- jobKeepWindow: string;
+ jobKeepDays: string;
name: string;
namespace: string;
ossAccessSecret: string;
- pieceInterval: string;
- recoveryWindow: string;
+ pieceIntervalDays: string;
+ recoveryDays: string;
scheduleDates: ScheduleDatesType;
scheduleTime: string;
scheduleType: string;
@@ -319,9 +319,9 @@ declare namespace API {
type BackupConfigEditable = {
destType: DestType;
- jobKeepWindow: number;
- pieceInterval: number;
- recoveryWindow: number;
+ jobKeepDays: number;
+ pieceIntervalDays: number;
+ recoveryDays: number;
scheduleDates: ScheduleDatesType;
scheduleTime: string;
scheduleType: string;
From 446f85e4ec93c3902851046e596770e7f0e5884d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=B4=E6=99=96?= <2689991790@qq.com>
Date: Tue, 5 Mar 2024 16:34:51 +0800
Subject: [PATCH 2/2] i18n
---
ui/src/i18n/strings/en-US.json | 9 +++++-
ui/src/i18n/strings/zh-CN.json | 9 +++++-
.../pages/Tenant/Detail/Backup/JobTable.tsx | 31 ++++++++++++++++---
ui/src/pages/Tenant/Detail/index.tsx | 6 +++-
4 files changed, 47 insertions(+), 8 deletions(-)
diff --git a/ui/src/i18n/strings/en-US.json b/ui/src/i18n/strings/en-US.json
index 0833972b8..2d39dbfd7 100644
--- a/ui/src/i18n/strings/en-US.json
+++ b/ui/src/i18n/strings/en-US.json
@@ -555,5 +555,12 @@
"Dashboard.Cluster.New.Monitor.Image": "Image",
"Dashboard.Cluster.New.Monitor.ImageList": "(Image list)",
"Dashboard.Cluster.New.Observer.Image": "Image",
- "Dashboard.Cluster.New.Observer.ImageList": "(Image list)"
+ "Dashboard.Cluster.New.Observer.ImageList": "(Image list)",
+ "Dashboard.Detail.Backup.JobTable.TaskName": "Task name",
+ "Dashboard.Detail.Backup.JobTable.Deadline": "Deadline",
+ "Dashboard.Detail.Backup.JobTable.EndTime": "End time",
+ "Dashboard.Detail.Backup.JobTable.Path": "Path",
+ "Dashboard.Detail.Backup.JobTable.ResourceStatus": "Resource status",
+ "Dashboard.Detail.Backup.JobTable.TaskStatus": "Task Status",
+ "Dashboard.Tenant.Detail.PerformanceMonitoring": "Performance monitoring"
}
diff --git a/ui/src/i18n/strings/zh-CN.json b/ui/src/i18n/strings/zh-CN.json
index 7fe9afdad..cbed082b1 100644
--- a/ui/src/i18n/strings/zh-CN.json
+++ b/ui/src/i18n/strings/zh-CN.json
@@ -555,5 +555,12 @@
"Dashboard.Cluster.New.Monitor.Image": "镜像",
"Dashboard.Cluster.New.Monitor.ImageList": "(镜像列表)",
"Dashboard.Cluster.New.Observer.Image": "镜像",
- "Dashboard.Cluster.New.Observer.ImageList": "(镜像列表)"
+ "Dashboard.Cluster.New.Observer.ImageList": "(镜像列表)",
+ "Dashboard.Detail.Backup.JobTable.TaskName": "任务名称",
+ "Dashboard.Detail.Backup.JobTable.Deadline": "截止时间",
+ "Dashboard.Detail.Backup.JobTable.EndTime": "结束时间",
+ "Dashboard.Detail.Backup.JobTable.Path": "路径",
+ "Dashboard.Detail.Backup.JobTable.ResourceStatus": "资源状态",
+ "Dashboard.Detail.Backup.JobTable.TaskStatus": "任务状态",
+ "Dashboard.Tenant.Detail.PerformanceMonitoring": "性能监控"
}
diff --git a/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx b/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx
index 37f04670f..c5b498811 100644
--- a/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx
+++ b/ui/src/pages/Tenant/Detail/Backup/JobTable.tsx
@@ -12,7 +12,10 @@ const getColumns = (
): TableProps['columns'] => {
return [
{
- title: '任务名称',
+ title: intl.formatMessage({
+ id: 'Dashboard.Detail.Backup.JobTable.TaskName',
+ defaultMessage: '任务名称',
+ }),
dataIndex: 'name',
key: 'name',
ellipsis: true,
@@ -33,12 +36,24 @@ const getColumns = (
key: 'startTime',
},
{
- title: curSelect === 'ARCHIVE' ? '截止时间' : '结束时间',
+ title:
+ curSelect === 'ARCHIVE'
+ ? intl.formatMessage({
+ id: 'Dashboard.Detail.Backup.JobTable.Deadline',
+ defaultMessage: '截止时间',
+ })
+ : intl.formatMessage({
+ id: 'Dashboard.Detail.Backup.JobTable.EndTime',
+ defaultMessage: '结束时间',
+ }),
dataIndex: 'endTime',
key: 'endTime',
},
{
- title: '路径',
+ title: intl.formatMessage({
+ id: 'Dashboard.Detail.Backup.JobTable.Path',
+ defaultMessage: '路径',
+ }),
dataIndex: 'path',
key: 'path',
ellipsis: true,
@@ -51,12 +66,18 @@ const getColumns = (
},
},
{
- title: '资源状态',
+ title: intl.formatMessage({
+ id: 'Dashboard.Detail.Backup.JobTable.ResourceStatus',
+ defaultMessage: '资源状态',
+ }),
dataIndex: 'status',
key: 'status',
},
{
- title: '任务状态',
+ title: intl.formatMessage({
+ id: 'Dashboard.Detail.Backup.JobTable.TaskStatus',
+ defaultMessage: '任务状态',
+ }),
dataIndex: 'statusInDatabase',
key: 'statusInDatabase',
},
diff --git a/ui/src/pages/Tenant/Detail/index.tsx b/ui/src/pages/Tenant/Detail/index.tsx
index 61ce9c4f5..43c668769 100644
--- a/ui/src/pages/Tenant/Detail/index.tsx
+++ b/ui/src/pages/Tenant/Detail/index.tsx
@@ -73,11 +73,15 @@ const TenantDetail: React.FC = () => {
link: `/tenant/${tenantId}/backup`,
},
{
- title: '性能监控',
+ title: intl.formatMessage({
+ id: 'Dashboard.Tenant.Detail.PerformanceMonitoring',
+ defaultMessage: '性能监控',
+ }),
key: 'monitor',
link: `/tenant/${tenantId}/monitor`,
},
];
+
const userMenu = (