diff options
Diffstat (limited to 'templates/_footer.tmpl')
-rw-r--r-- | templates/_footer.tmpl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/_footer.tmpl b/templates/_footer.tmpl index 07bc857..97a5bf8 100644 --- a/templates/_footer.tmpl +++ b/templates/_footer.tmpl @@ -8,6 +8,20 @@ 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, 1000); + </script> </body> </html> |