aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_footer.tmpl14
-rw-r--r--templates/_head.tmpl1
-rw-r--r--templates/index.tmpl4
3 files changed, 19 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>
diff --git a/templates/_head.tmpl b/templates/_head.tmpl
index 2bb58c4..b99510f 100644
--- a/templates/_head.tmpl
+++ b/templates/_head.tmpl
@@ -2,6 +2,7 @@
<!DOCTYPE html>
<html>
<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/assets/bulma.min.css">
</head>
<body>
diff --git a/templates/index.tmpl b/templates/index.tmpl
index 9bb7512..ae7f674 100644
--- a/templates/index.tmpl
+++ b/templates/index.tmpl
@@ -8,6 +8,7 @@
<th scope="col">Title</th>
<th scope="col">Link</th>
<th scope="col">Output</th>
+ <th scope="col">Status</th>
<th scope="col"></th>
</tr>
</thead>
@@ -19,6 +20,9 @@
<td>{{ .Link }}</td>
<td>{{ .OutputFolder }}</td>
<td>
+ <span id="status_{{ .ID }}" class="tag is-primary is-light"></span>
+ </td>
+ <td>
<a href="entries/{{ .ID }}" >Edit</a>
</span>
<a onclick="deleteEntry({{ .ID }})">Delete</a>