midr @ 73b1e5746a3f074aa103b5914a02769ff057c56e

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