Add advanced menu on job to allow user to do things like make a job as stopped if the status ever gets hung

This commit is contained in:
Jaret Burkett
2025-09-28 13:43:00 -06:00
parent 4e207d92cd
commit c20240be82
3 changed files with 73 additions and 2 deletions

View File

@@ -50,6 +50,22 @@ export const deleteJob = (jobID: string) => {
});
};
export const markJobAsStopped = (jobID: string) => {
return new Promise<void>((resolve, reject) => {
apiClient
.get(`/api/jobs/${jobID}/mark_stopped`)
.then(res => res.data)
.then(data => {
console.log('Job marked as stopped:', data);
resolve();
})
.catch(error => {
console.error('Error marking job as stopped:', error);
reject(error);
});
});
};
export const getJobConfig = (job: Job) => {
return JSON.parse(job.job_config) as JobConfig;
};