diff --git a/etc/static/index.html b/etc/static/index.html
index 391afde..934ea2f 100644
--- a/etc/static/index.html
+++ b/etc/static/index.html
@@ -3,6 +3,7 @@
Status
+
@@ -31,6 +32,16 @@
http.send(data);
}
+ function refreshStatus() {
+ fetch("/minecraft-status")
+ .then(res => res.json())
+ .then((out) => {
+ document.getElementById('minecraft_status').innerText = "has started: " + out.status;
+ })
+ .catch(err => { throw err });
+ setTimeout(refreshStatus, 5000);
+ }
+
function refreshLog() {
fetch("/minecraft-log")
.then(res => res.json())
@@ -38,8 +49,9 @@
document.getElementById('minecraft_log').innerText = out.log;
})
.catch(err => { throw err });
- setTimeout(refreshLog, 500);
+ setTimeout(refreshLog, 5000);
}
+ setTimeout(refreshStatus, 500);
setTimeout(refreshLog, 500);
\ No newline at end of file