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

56 lines
924 B
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Maloja - Please wait</title>
</head>
2019-03-29 21:44:42 +03:00
<body>
<table class="top_info">
<tr>
2019-03-29 21:44:42 +03:00
<td class="text">
<h1>Maloja</h1><br/>
<span>Redbuilding the database</span>
2019-03-29 21:44:42 +03:00
<p>Please wait...</p>
</td>
</tr>
</table>
2019-03-29 21:44:42 +03:00
</body>
2019-03-29 21:44:42 +03:00
<script>
var pending = false;
setInterval(probeServer,1500);
2019-03-29 21:44:42 +03:00
function probeServer() {
if (!pending) {
console.log("Probing...");
pending = true;
var xhttp = new XMLHttpRequest();
xhttp.open("GET","/db/test", true);
xhttp.onreadystatechange = goback;
xhttp.send();
2019-03-29 21:44:42 +03:00
}
2019-03-29 21:44:42 +03:00
}
2019-03-29 21:44:42 +03:00
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";
}
}
2019-03-29 21:44:42 +03:00
</script>
</html>