feat: status page + maintenance
This commit is contained in:
parent
02645b7ef7
commit
f3d697699d
File diff suppressed because one or more lines are too long
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
}
|
||||
.container_log {
|
||||
text-align: left;
|
||||
width: 48.4em;
|
||||
width: 48.6em;
|
||||
padding: 0.2em;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
|
|
|
@ -11,6 +11,7 @@ Content-type: text/html
|
|||
href="/thsf.net/maintenance/style/maintenance.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<script src="/thsf.net/maintenance/scripts/jquery-3.7.0.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page_wrapper">
|
||||
|
@ -30,7 +31,7 @@ Content-type: text/html
|
|||
<div class="status">{{ container.name }}</div>
|
||||
<div class="status">{{ container.status }}</div>
|
||||
<div class="status">
|
||||
<i class="button fa-regular fa-recycle" onclick="reboot()"></i>
|
||||
<i id="reboot" class="button fa-regular fa-recycle" onclick="reboot()"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container_log" id="logs">
|
||||
|
|
Loading…
Reference in New Issue