diff --git a/packages/dag/src/components/monitor/Node.vue b/packages/dag/src/components/monitor/Node.vue index 3098099006..aa7f788f4d 100644 --- a/packages/dag/src/components/monitor/Node.vue +++ b/packages/dag/src/components/monitor/Node.vue @@ -165,7 +165,7 @@ const initialSyncProcess = computed(() => { } = props.sample || {} if (props.syncType === 'migrate') return tableTotal ? Math.round((snapshotTableTotal / tableTotal) * 100) : 0 - if (snapshotTableTotal === tableTotal) return 100 + if (tableTotal > 0 && snapshotTableTotal === tableTotal) return 100 return snapshotRowTotal ? Math.round((snapshotInsertRowTotal / snapshotRowTotal) * 100) : 0 diff --git a/packages/dag/src/components/monitor/components/NodeDetailDialog.vue b/packages/dag/src/components/monitor/components/NodeDetailDialog.vue index 1c68810abf..c7c48ed038 100644 --- a/packages/dag/src/components/monitor/components/NodeDetailDialog.vue +++ b/packages/dag/src/components/monitor/components/NodeDetailDialog.vue @@ -318,7 +318,7 @@ const totalDataPercentage = computed(() => { text: `${snapshotTableTotal}/${tableTotal}`, } : { val: 0, text: '' } - if (snapshotTableTotal === tableTotal) + if (tableTotal > 0 && snapshotTableTotal === tableTotal) return { val: 100, text: '',