blob: b72953bfe205e50078ddbd7e2cf27b23ab0596ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
{{ define "_footer" }}
</main>
<script>
function deleteEntry(id) {
fetch("/entries/"+id, { method: 'DELETE' })
.then((res)=>{
window.location.href = '/'
});
}
function getStatus() {
fetch("/jobs/", { method: 'GET'})
.then((res) => { return objs = res.json(); })
.then((objs) => {
for (i in objs) {
span = document.getElementById("status_"+objs[i].Id);
span.textContent = objs[i].Status;
}
});
}
setInterval(getStatus, 5000);
</script>
</body>
</html>
{{ end }}
|