2023-03-09 13:55:52 +00:00
|
|
|
/*****************************************************************************
|
2023-10-04 10:32:27 +00:00
|
|
|
* Requests for /jobs routes *
|
2023-03-09 13:55:52 +00:00
|
|
|
*****************************************************************************/
|
|
|
|
Requests.jobs = {};
|
|
|
|
|
|
|
|
Requests.jobs.entity = {};
|
|
|
|
|
|
|
|
Requests.jobs.entity.delete = (jobId) => {
|
|
|
|
let input = `/jobs/${jobId}`;
|
|
|
|
let init = {
|
|
|
|
method: 'DELETE'
|
|
|
|
};
|
|
|
|
return Requests.JSONfetch(input, init);
|
|
|
|
}
|
|
|
|
|
|
|
|
Requests.jobs.entity.log = (jobId) => {
|
|
|
|
let input = `/jobs/${jobId}/log`;
|
|
|
|
let init = {
|
|
|
|
method: 'GET'
|
|
|
|
};
|
|
|
|
return Requests.JSONfetch(input, init);
|
|
|
|
}
|
2023-03-10 07:47:03 +00:00
|
|
|
|
|
|
|
Requests.jobs.entity.restart = (jobId) => {
|
|
|
|
let input = `/jobs/${jobId}/restart`;
|
|
|
|
let init = {
|
|
|
|
method: 'POST'
|
|
|
|
};
|
|
|
|
return Requests.JSONfetch(input, init);
|
|
|
|
}
|