feat: status page + maintenance

This commit is contained in:
mco-system 2023-05-27 17:45:07 +11:00
parent 9112763234
commit 02645b7ef7

View File

@ -1,13 +1,18 @@
function reboot() { function reboot() {
console.log("Vroom...");
var xhttp = new XMLHttpRequest(); var xhttp = new XMLHttpRequest();
console.log("Vroop...");
xhttp.onreadystatechange = function() { xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && this.status == 200) {
console.log("Ready..."); console.log("Houba");
document.getElementById("logs").innerHTML = this.responseText; document.getElementById("logs").innerHTML = this.responseText;
console.log("Hop"); console.log("Hop");
setTimeout(function () {location.reload()}, 5000); setTimeout(function () {location.reload()}, 5000);
} }
}; };
console.log("Ready");
xhttp.open("GET", "https://www.thsf.net/thsf.net/maintenance/reboot.py", true); xhttp.open("GET", "https://www.thsf.net/thsf.net/maintenance/reboot.py", true);
console.log("Go");
xhttp.send(); xhttp.send();
console.log("Gone !");
} }