nopaque/app/static/js/requests/jobs.js

31 lines
840 B
JavaScript
Raw Normal View History

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
*****************************************************************************/
nopaque.requests.jobs = {};
2023-03-09 13:55:52 +00:00
nopaque.requests.jobs.entity = {};
2023-03-09 13:55:52 +00:00
nopaque.requests.jobs.entity.delete = (jobId) => {
2023-03-09 13:55:52 +00:00
let input = `/jobs/${jobId}`;
let init = {
method: 'DELETE'
};
return nopaque.requests.JSONfetch(input, init);
2023-10-04 11:48:10 +00:00
};
2023-03-09 13:55:52 +00:00
nopaque.requests.jobs.entity.log = (jobId) => {
2023-03-09 13:55:52 +00:00
let input = `/jobs/${jobId}/log`;
let init = {
method: 'GET'
};
return nopaque.requests.JSONfetch(input, init);
2023-10-04 11:48:10 +00:00
};
2023-03-10 07:47:03 +00:00
nopaque.requests.jobs.entity.restart = (jobId) => {
2023-03-10 07:47:03 +00:00
let input = `/jobs/${jobId}/restart`;
let init = {
method: 'POST'
};
return nopaque.requests.JSONfetch(input, init);
2023-10-04 11:48:10 +00:00
};