From c9b4d45a64f398e2da22a4f759544069012f9cac Mon Sep 17 00:00:00 2001 From: GraceWalk Date: Tue, 13 Sep 2022 14:31:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Job=20=E6=89=A9?= =?UTF-8?q?=E7=BC=A9=E5=89=AF=E6=9C=AC=E4=BB=BB=E5=8A=A1=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/Jobs/ExpandedRow.tsx | 6 ++++-- .../layout-clusters-fe/src/pages/Jobs/config.tsx | 16 ++++++++++++---- .../layout-clusters-fe/src/pages/Jobs/index.tsx | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/km-console/packages/layout-clusters-fe/src/pages/Jobs/ExpandedRow.tsx b/km-console/packages/layout-clusters-fe/src/pages/Jobs/ExpandedRow.tsx index f86b7158..399be7a7 100644 --- a/km-console/packages/layout-clusters-fe/src/pages/Jobs/ExpandedRow.tsx +++ b/km-console/packages/layout-clusters-fe/src/pages/Jobs/ExpandedRow.tsx @@ -61,9 +61,11 @@ const columns: any = [ const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0; return (
- 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'}> + 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'} + > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0} + percent={movedSize === 0 && totalSize === 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0} strokeColor="#556EE6" trailColor="#ECECF1" showInfo={false} diff --git a/km-console/packages/layout-clusters-fe/src/pages/Jobs/config.tsx b/km-console/packages/layout-clusters-fe/src/pages/Jobs/config.tsx index 3474cb2e..5dd24ce9 100644 --- a/km-console/packages/layout-clusters-fe/src/pages/Jobs/config.tsx +++ b/km-console/packages/layout-clusters-fe/src/pages/Jobs/config.tsx @@ -314,9 +314,13 @@ export const getTaskDetailsColumns = (arg?: any) => { const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0; return (
- 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'}> + 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%' + } + > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0} + percent={r.success === r.total && r.total > 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0} strokeColor="#556EE6" showInfo={false} /> @@ -438,9 +442,13 @@ export const getMoveBalanceColumns = (arg?: any) => { const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0; return (
- 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'}> + 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%' + } + > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0} + percent={r.success === r.total && r.total > 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0} strokeColor="#556EE6" showInfo={false} /> diff --git a/km-console/packages/layout-clusters-fe/src/pages/Jobs/index.tsx b/km-console/packages/layout-clusters-fe/src/pages/Jobs/index.tsx index 29448b1d..84e70298 100644 --- a/km-console/packages/layout-clusters-fe/src/pages/Jobs/index.tsx +++ b/km-console/packages/layout-clusters-fe/src/pages/Jobs/index.tsx @@ -209,7 +209,7 @@ const JobsList: React.FC = (props: any) => { tableProps={{ tableId: 'jobs_list', showHeader: false, - rowKey: 'jobs_list', + rowKey: 'id', loading: loading, columns: getJobsListColumns({ onDelete, setViewProgress }), dataSource: data,