mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-04 20:02:07 +08:00
fix: 修复 Job 扩缩副本任务明细错误的问题
This commit is contained in:
@@ -61,9 +61,11 @@ const columns: any = [
|
|||||||
const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0;
|
const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0;
|
||||||
return (
|
return (
|
||||||
<div className="message-size">
|
<div className="message-size">
|
||||||
<Tooltip title={(movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'}>
|
<Tooltip
|
||||||
|
title={(movedSize === 0 && totalSize === 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'}
|
||||||
|
>
|
||||||
<Progress
|
<Progress
|
||||||
percent={movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0}
|
percent={movedSize === 0 && totalSize === 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0}
|
||||||
strokeColor="#556EE6"
|
strokeColor="#556EE6"
|
||||||
trailColor="#ECECF1"
|
trailColor="#ECECF1"
|
||||||
showInfo={false}
|
showInfo={false}
|
||||||
|
|||||||
@@ -314,9 +314,13 @@ export const getTaskDetailsColumns = (arg?: any) => {
|
|||||||
const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0;
|
const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0;
|
||||||
return (
|
return (
|
||||||
<div className="message-size">
|
<div className="message-size">
|
||||||
<Tooltip title={(movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'}>
|
<Tooltip
|
||||||
|
title={
|
||||||
|
(r.success === r.total && r.total > 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'
|
||||||
|
}
|
||||||
|
>
|
||||||
<Progress
|
<Progress
|
||||||
percent={movedSize > 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"
|
strokeColor="#556EE6"
|
||||||
showInfo={false}
|
showInfo={false}
|
||||||
/>
|
/>
|
||||||
@@ -438,9 +442,13 @@ export const getMoveBalanceColumns = (arg?: any) => {
|
|||||||
const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0;
|
const totalSize = r.totalSize ? Number(Utils.formatAssignSize(t, 'MB')) : 0;
|
||||||
return (
|
return (
|
||||||
<div className="message-size">
|
<div className="message-size">
|
||||||
<Tooltip title={(movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'}>
|
<Tooltip
|
||||||
|
title={
|
||||||
|
(r.success === r.total && r.total > 0 ? 100 : movedSize > 0 && totalSize > 0 ? (movedSize / totalSize) * 100 : 0) + '%'
|
||||||
|
}
|
||||||
|
>
|
||||||
<Progress
|
<Progress
|
||||||
percent={movedSize > 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"
|
strokeColor="#556EE6"
|
||||||
showInfo={false}
|
showInfo={false}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ const JobsList: React.FC = (props: any) => {
|
|||||||
tableProps={{
|
tableProps={{
|
||||||
tableId: 'jobs_list',
|
tableId: 'jobs_list',
|
||||||
showHeader: false,
|
showHeader: false,
|
||||||
rowKey: 'jobs_list',
|
rowKey: 'id',
|
||||||
loading: loading,
|
loading: loading,
|
||||||
columns: getJobsListColumns({ onDelete, setViewProgress }),
|
columns: getJobsListColumns({ onDelete, setViewProgress }),
|
||||||
dataSource: data,
|
dataSource: data,
|
||||||
|
|||||||
Reference in New Issue
Block a user