feat: handleScheduleRecoridng
This commit is contained in:
@@ -101,6 +101,17 @@ export const MainPage = ({ handleEditRecording }: MainPageProps) => {
|
|||||||
}
|
}
|
||||||
}, [runningRecordingName, sockets, ids, readyForRunHandler, debugMessageHandler])
|
}, [runningRecordingName, sockets, ids, readyForRunHandler, debugMessageHandler])
|
||||||
|
|
||||||
|
const handleScheduleRecording = (settings: ScheduleSettings) => {
|
||||||
|
scheduleStoredRecording(runningRecordingName, settings)
|
||||||
|
.then(({message, runId}: ScheduleRunResponse) => {
|
||||||
|
if (message === 'success') {
|
||||||
|
notify('success', `Recording ${runningRecordingName} scheduled successfully`);
|
||||||
|
} else {
|
||||||
|
notify('error', `Failed to schedule recording ${runningRecordingName}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const DisplayContent = () => {
|
const DisplayContent = () => {
|
||||||
switch (content) {
|
switch (content) {
|
||||||
case 'recordings':
|
case 'recordings':
|
||||||
@@ -108,7 +119,7 @@ export const MainPage = ({ handleEditRecording }: MainPageProps) => {
|
|||||||
handleEditRecording={handleEditRecording}
|
handleEditRecording={handleEditRecording}
|
||||||
handleRunRecording={handleRunRecording}
|
handleRunRecording={handleRunRecording}
|
||||||
setFileName={setFileName}
|
setFileName={setFileName}
|
||||||
handleScheduleRecording={(settings: ScheduleSettings) => scheduleStoredRecording(runningRecordingName, settings)}
|
handleScheduleRecording={handleScheduleRecording}
|
||||||
/>;
|
/>;
|
||||||
case 'runs':
|
case 'runs':
|
||||||
return <Runs
|
return <Runs
|
||||||
|
|||||||
Reference in New Issue
Block a user