diff --git a/src/videoag/course/Medium.tsx b/src/videoag/course/Medium.tsx index 76fa18c23c4a87b86b2a9002db8d51f3d371421e..896e13a656beed97b68f9f488878b0ed1fcda1b8 100644 --- a/src/videoag/course/Medium.tsx +++ b/src/videoag/course/Medium.tsx @@ -565,13 +565,13 @@ export function MediaProcessOverview({ lectureId }: { lectureId: int }) { if (error !== undefined) { return ( - <ReloadBoundary reloadFunc={reloadData}> + <NestedReloadBoundary reloadFunc={reloadData}> <ErrorComponent error={error} objectName="Media Process Overview" showButtons={false} /> - </ReloadBoundary> + </NestedReloadBoundary> ); } @@ -580,99 +580,101 @@ export function MediaProcessOverview({ lectureId }: { lectureId: int }) { } return ( - <ul className="list-unstyled"> - <table className="table"> - <thead> - <tr> - <th scope="col" style={{ width: "30%" }} /> - <th scope="col" style={{ width: "70%" }} /> - </tr> - </thead> - <tbody> - <tr> - <td>Current Media Process</td> - <td> - <textarea - value={JSON.stringify(overviewData.process, null, " ")} - disabled={true} - className="w-100" - /> - </td> - </tr> - <tr> - <td>Current Media Process SHA256</td> - <td>{overviewData.process_sha256}</td> - </tr> - <tr> - <td>Status</td> - <td className="white-space-pre-wrap">{overviewData.status}</td> - </tr> - <tr> - <td> - Is automatic Media Process Scheduler enabled?{" "} - <TooltipButton> - This shows whether the media process scheduler will automatically - run when any changes occur that might require processing media - files. This can be changed in the lecture config or, if the lecture - has specified 'Inherit', in the course config. - </TooltipButton> - </td> - <td> - {overviewData.is_automatic_media_process_scheduler_enabled - ? "Yes" - : "No"} - </td> - </tr> - </tbody> - </table> - <div className="mb-4 d-flex align-items-center"> - <button - onClick={runScheduler} - disabled={doingSchedulerRequest} - className="btn btn-secondary" - > - Run Media Process Scheduler Manually - </button> - <TooltipButton> - If the automatic media process scheduler is disabled, you can run it manually - here (You will need to run it multiple times until the process is finished; - after every finished job). - <br /> - <br /> - If a job failed the automatic process scheduler will also not run again - automatically (to prevent infinite loops) and you can run it manually. It will - automatically detect the failed job and schedule a new one which might or might - not fail again. - <br /> - <br /> - In all other cases you do not need to run it manually. - </TooltipButton> - <Spinner visible={doingSchedulerRequest} /> - {schedulerJobId && ( - <span className="m-1"> - <JobStatusCard jobId={schedulerJobId} /> - </span> - )} - </div> - <li> - <ul className="list-unstyled"> - {Object.values(overviewData.sorter_files).map((file) => ( - <li key={file.id}> - <SorterFileListItem context={overviewData} sorterFileId={file.id} /> - </li> - ))} - </ul> - </li> - <li> - <ul className="list-unstyled"> - {Object.values(overviewData.medium_files).map((file) => ( - <li key={file.id}> - <MediumFileListItem context={overviewData} mediumFileId={file.id} /> - </li> - ))} - </ul> - </li> - </ul> + <NestedReloadBoundary reloadFunc={reloadData} > + <ul className="list-unstyled"> + <table className="table"> + <thead> + <tr> + <th scope="col" style={{ width: "30%" }} /> + <th scope="col" style={{ width: "70%" }} /> + </tr> + </thead> + <tbody> + <tr> + <td>Current Media Process</td> + <td> + <textarea + value={JSON.stringify(overviewData.process, null, " ")} + disabled={true} + className="w-100" + /> + </td> + </tr> + <tr> + <td>Current Media Process SHA256</td> + <td>{overviewData.process_sha256}</td> + </tr> + <tr> + <td>Status</td> + <td className="white-space-pre-wrap">{overviewData.status}</td> + </tr> + <tr> + <td> + Is automatic Media Process Scheduler enabled?{" "} + <TooltipButton> + This shows whether the media process scheduler will automatically + run when any changes occur that might require processing media + files. This can be changed in the lecture config or, if the lecture + has specified 'Inherit', in the course config. + </TooltipButton> + </td> + <td> + {overviewData.is_automatic_media_process_scheduler_enabled + ? "Yes" + : "No"} + </td> + </tr> + </tbody> + </table> + <div className="mb-4 d-flex align-items-center"> + <button + onClick={runScheduler} + disabled={doingSchedulerRequest} + className="btn btn-secondary" + > + Run Media Process Scheduler Manually + </button> + <TooltipButton> + If the automatic media process scheduler is disabled, you can run it manually + here (You will need to run it multiple times until the process is finished; + after every finished job). + <br /> + <br /> + If a job failed the automatic process scheduler will also not run again + automatically (to prevent infinite loops) and you can run it manually. It will + automatically detect the failed job and schedule a new one which might or might + not fail again. + <br /> + <br /> + In all other cases you do not need to run it manually. + </TooltipButton> + <Spinner visible={doingSchedulerRequest} /> + {schedulerJobId && ( + <span className="m-1"> + <JobStatusCard jobId={schedulerJobId} /> + </span> + )} + </div> + <li> + <ul className="list-unstyled"> + {Object.values(overviewData.sorter_files).map((file) => ( + <li key={file.id}> + <SorterFileListItem context={overviewData} sorterFileId={file.id} /> + </li> + ))} + </ul> + </li> + <li> + <ul className="list-unstyled"> + {Object.values(overviewData.medium_files).map((file) => ( + <li key={file.id}> + <MediumFileListItem context={overviewData} mediumFileId={file.id} /> + </li> + ))} + </ul> + </li> + </ul> + </NestedReloadBoundary> ); }