Skip to content
Snippets Groups Projects
Commit 20619c41 authored by Simon Künzel's avatar Simon Künzel
Browse files

Do automatic reload from job card when job finished

parent 3ebad15e
No related branches found
No related tags found
No related merge requests found
Pipeline #7686 passed
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment