2024-02-16 03:10:08 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<link rel="stylesheet" href="https://cdn.alemi.dev/web/alemi.css">
|
|
|
|
<title>mumble stats</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<h3 id="loading">loading...</h3>
|
|
|
|
<p><table id="stats" class="w-100 align"></table></p>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
let loading = document.getElementById("loading");
|
|
|
|
let stats = document.getElementById("stats");
|
|
|
|
async function pingServer() {
|
|
|
|
try {
|
|
|
|
let res = await fetch("https://api.fantabos.co/mumble/ping")
|
|
|
|
let doc = await res.json()
|
2024-02-16 03:34:45 +01:00
|
|
|
stats.innerHTML = `
|
|
|
|
<tr>
|
2024-02-16 03:10:08 +01:00
|
|
|
<td><code>users</code> ${doc.users}/${doc.max_users}</td>
|
2024-02-16 03:34:45 +01:00
|
|
|
<td><code>bandwidth</code> ${doc.bandwidth}</td>
|
|
|
|
<td><code>version</code> ${doc.version}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><code>ping</code> ${doc.ping}</td>
|
|
|
|
<td><code>roundtrip</code> ${doc.roundtrip}</td>
|
2024-02-16 03:10:08 +01:00
|
|
|
<td><code>time</code> ${doc.time}</td>
|
|
|
|
</tr>`;
|
|
|
|
loading.remove();
|
|
|
|
} catch (e) {
|
|
|
|
loading.innerHTML = `error reaching api: ${e}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pingServer()
|
|
|
|
setInterval(pingServer, 1000 * 60);
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</html>
|