From 20619c4126daebb82511ea9ecedb0776fc8b9d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20K=C3=BCnzel?= <simonk@fsmpi.rwth-aachen.de> Date: Sat, 3 May 2025 15:14:03 +0200 Subject: [PATCH] Do automatic reload from job card when job finished --- src/videoag/job/Job.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/videoag/job/Job.tsx b/src/videoag/job/Job.tsx index fb9f08a..781239c 100644 --- a/src/videoag/job/Job.tsx +++ b/src/videoag/job/Job.tsx @@ -5,9 +5,11 @@ import { useApi } from "@/videoag/api/ApiProvider"; import { datetimeToString } from "@/videoag/miscellaneous/Formatting"; import { Spinner } from "@/videoag/miscellaneous/Util"; import { useDebouncedCall } from "@/videoag/miscellaneous/PromiseHelpers"; +import { useReloadBoundary } from "@/videoag/miscellaneous/ReloadBoundary"; export function JobStatusCard({ jobId }: { jobId: int }) { const api = useApi(); + const reloadFunc = useReloadBoundary(); const [job, setJob] = useState<job | undefined>(undefined); const [isLoading, setIsLoading] = useState<boolean>(false); @@ -33,6 +35,7 @@ export function JobStatusCard({ jobId }: { jobId: int }) { setErrorMsg(undefined); if (doAutomaticReload.current && canJobStatusChange(updateData.state)) reloadStatusDeferred(); + else reloadFunc(); }) .catch((e) => { setErrorMsg("Unable to update status: " + e.toString()); -- GitLab