feat: status page + maintenance

This commit is contained in:
mco-system
2023-05-27 17:58:14 +11:00
parent 02645b7ef7
commit f3d697699d
4 changed files with 11 additions and 20 deletions

File diff suppressed because one or more lines are too long

View File

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