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

Database can now analyze consistency of scrobble data

This commit is contained in:
Krateng
2018-12-21 16:32:21 +01:00
parent c6f5f38246
commit e0ec4b3137
9 changed files with 134 additions and 18 deletions

56
website/wait.html Normal file
View File

@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Maloja - Please wait</title>
<link rel="stylesheet" href="maloja.css" />
</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>