Fix job deletion from job page

This commit is contained in:
Patrick Jentsch 2023-11-29 16:11:14 +01:00
parent a7cbce1eda
commit 17a9338d9f

View File

@ -153,16 +153,16 @@
let deleteJobRequestElement = document.querySelector('#delete-job-request'); let deleteJobRequestElement = document.querySelector('#delete-job-request');
let restartJobRequestElement = document.querySelector('#restart-job-request'); let restartJobRequestElement = document.querySelector('#restart-job-request');
deleteJobRequestElement.addEventListener('click', (event) => { deleteJobRequestElement.addEventListener('click', (event) => {
requests.jobs.entity.delete({{ job.hashid|tojson }}); nopaque.requests.jobs.entity.delete({{ job.hashid|tojson }});
}); });
restartJobRequestElement.addEventListener('click', (event) => { restartJobRequestElement.addEventListener('click', (event) => {
requests.jobs.entity.restart({{ job.hashid|tojson }}); nopaque.requests.jobs.entity.restart({{ job.hashid|tojson }});
}); });
if ({{ current_user.is_administrator()|tojson }}) { if ({{ current_user.is_administrator()|tojson }}) {
let jobLogButtonElement = document.querySelector('#job-log-button'); let jobLogButtonElement = document.querySelector('#job-log-button');
jobLogButtonElement.addEventListener('click', (event) => { jobLogButtonElement.addEventListener('click', (event) => {
requests.jobs.entity.log({{ job.hashid|tojson }}) nopaque.requests.jobs.entity.log({{ job.hashid|tojson }})
.then( .then(
(response) => { (response) => {
response.json() response.json()