midr @ 40d80bde511a7a76a0f5a3c16afc9eef2e5972e2

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