From e6b4afcdc6b5e3868b738d53e809eda962f463ea Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Wed, 10 Dec 2025 19:23:28 +0530 Subject: [PATCH 1/2] add box for skip destination drop --- ui/app/mirrors/[mirrorId]/handlers.ts | 5 +++-- ui/components/DropDialog.tsx | 21 ++++++++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ui/app/mirrors/[mirrorId]/handlers.ts b/ui/app/mirrors/[mirrorId]/handlers.ts index f8e1d8a0ab..d382d47345 100644 --- a/ui/app/mirrors/[mirrorId]/handlers.ts +++ b/ui/app/mirrors/[mirrorId]/handlers.ts @@ -27,13 +27,14 @@ export async function getCurrentIdleTimeout(mirrorName: string) { export async function changeFlowState( mirrorName: string, flowState: FlowStatus, - dropStats?: boolean + dropStats?: boolean, + skipDestDrop?: boolean ): Promise { const req: FlowStateChangeRequest = { flowJobName: mirrorName, requestedFlowState: flowState, dropMirrorStats: dropStats ?? false, - skipDestinationDrop: false, + skipDestinationDrop: skipDestDrop ?? false, }; const res = await fetch('/api/v1/mirrors/state_change', { method: 'POST', diff --git a/ui/components/DropDialog.tsx b/ui/components/DropDialog.tsx index b71c2284c8..e48497c1d5 100644 --- a/ui/components/DropDialog.tsx +++ b/ui/components/DropDialog.tsx @@ -31,13 +31,15 @@ async function handleDropMirror( dropArgs: dropMirrorArgs, setLoading: Dispatch>, setMsg: Dispatch>, - dropStats: boolean + dropStats: boolean, + skipDestDrop: boolean ) { setLoading(true); const res = await changeFlowState( dropArgs.flowJobName, FlowStatus.STATUS_TERMINATING, - dropStats + dropStats, + skipDestDrop ); setLoading(false); if (res.status !== 200) { @@ -60,6 +62,7 @@ export default function DropDialog({ const [loading, setLoading] = useState(false); const [msg, setMsg] = useState(''); const [dropStats, setDropStats] = useState(true); + const [skipDestDrop, setSkipDestDrop] = useState(false); const handleDropPeer = async (dropArgs: dropPeerArgs) => { if (!dropArgs.peerName) { @@ -133,7 +136,8 @@ export default function DropDialog({ dropArgs as dropMirrorArgs, setLoading, setMsg, - dropStats + dropStats, + skipDestDrop ); case 'PEER': return handleDropPeer(dropArgs as dropPeerArgs); @@ -179,6 +183,17 @@ export default function DropDialog({ } /> )} + {mode === 'MIRROR' && ( + Skip destination drop} + action={ + setSkipDestDrop(state)} + /> + } + /> + )}
From a289ed43a480f06611a9737c00e7193f3e24d7c3 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Wed, 10 Dec 2025 19:29:10 +0530 Subject: [PATCH 2/2] change wording --- ui/components/DropDialog.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/components/DropDialog.tsx b/ui/components/DropDialog.tsx index e48497c1d5..fed6bb5169 100644 --- a/ui/components/DropDialog.tsx +++ b/ui/components/DropDialog.tsx @@ -185,7 +185,9 @@ export default function DropDialog({ )} {mode === 'MIRROR' && ( Skip destination drop} + label={ + + } action={