midr @ c430ebff167dcfc073c1c6a3375d6284936218a7

 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 }}