From 7fe6cce350074f0b207da0bd85770ef953cb5b89 Mon Sep 17 00:00:00 2001 From: garethgeorge Date: Sun, 18 Aug 2024 13:04:26 -0700 Subject: [PATCH] fix: double display of snapshot ID for 'Snapshots' in operation tree --- webui/src/components/OperationTree.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/webui/src/components/OperationTree.tsx b/webui/src/components/OperationTree.tsx index f487163b..6778a196 100644 --- a/webui/src/components/OperationTree.tsx +++ b/webui/src/components/OperationTree.tsx @@ -168,12 +168,16 @@ export const OperationTree = ({ ) { details.push(opDetails.displayState); } + } + let snapshotId: string | null = null; + for (const op of b.operations) { if (op.snapshotId) { - details.push(`ID: ${normalizeSnapshotId(op.snapshotId)}`); + snapshotId = op.snapshotId; + break; } } - if (b.snapshotInfo) { - details.push(`ID: ${normalizeSnapshotId(b.snapshotInfo.id)}`); + if (snapshotId) { + details.push(`ID: ${normalizeSnapshotId(snapshotId)}`); } let detailsElem: React.ReactNode | null = null;