1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00
maloja/website/wait.html
2019-03-29 19:44:42 +01:00

56 lines
924 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Maloja - Please wait</title>
</head>
<body>
<table class="top_info">
<tr>
<td class="text">
<h1>Maloja</h1><br/>
<span>Redbuilding the database</span>
<p>Please wait...</p>
</td>
</tr>
</table>
</body>
<script>
var pending = false;
setInterval(probeServer,1500);
function probeServer() {
if (!pending) {
console.log("Probing...");
pending = true;
var xhttp = new XMLHttpRequest();
xhttp.open("GET","/db/test", true);
xhttp.onreadystatechange = goback;
xhttp.send();
}
}
function goback() {
if ((this.readyState == 4) && (this.status == 205)) {
console.log("Not ready yet!")
pending = false;
}
if ((this.readyState == 4) && (this.status == 204)) {
console.log("K");
pending = false;
window.location = "/issues";
}
}
</script>
</html>