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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user