diff --git a/app/client/modules/backups/components/schedule-summary.tsx b/app/client/modules/backups/components/schedule-summary.tsx index 15aee695..338a7aa6 100644 --- a/app/client/modules/backups/components/schedule-summary.tsx +++ b/app/client/modules/backups/components/schedule-summary.tsx @@ -35,6 +35,7 @@ export const ScheduleSummary = (props: Props) => { props; const [showDeleteConfirm, setShowDeleteConfirm] = useState(false); const [showForgetConfirm, setShowForgetConfirm] = useState(false); + const [showStopConfirm, setShowStopConfirm] = useState(false); const runForget = useMutation({ ...runForgetMutation(), @@ -78,6 +79,12 @@ export const ScheduleSummary = (props: Props) => { runForget.mutate({ path: { scheduleId: schedule.id.toString() } }); }; + const handleConfirmStop = () => { + setShowStopConfirm(false); + if (schedule.lastBackupStatus !== "in_progress") return; + handleStopBackup(); + }; + return (
@@ -108,7 +115,12 @@ export const ScheduleSummary = (props: Props) => {
{schedule.lastBackupStatus === "in_progress" ? ( - @@ -239,6 +251,26 @@ export const ScheduleSummary = (props: Props) => {
+ + + + + Stop running backup? + + Are you sure you want to stop the current backup for {schedule.name}? + + +
+ Cancel + + Stop backup + +
+
+
); };