Add version to stats page

This commit is contained in:
Fred Boniface 2023-03-10 22:10:25 +00:00
parent c9d231fd7e
commit b09c97e911
3 changed files with 16 additions and 15 deletions

View File

@ -8,7 +8,7 @@ if ("serviceWorker" in navigator) {
async function pageInit() { async function pageInit() {
await loadQuickLinks(); await loadQuickLinks();
hideLoading(); // From lib.main hideLoading(); // From lib.main
localStorage.setItem("web_ver", document.getElementById('ver_str').textContent) localStorage.setItem("ver-web", document.getElementById('ver_str').textContent)
} }
async function gotoBoard(station){ async function gotoBoard(station){

View File

@ -22,4 +22,7 @@ async function display(data) {
document.getElementById('stations').textContent = dat.stations || "0"; document.getElementById('stations').textContent = dat.stations || "0";
document.getElementById('users').textContent = dat.user || "0"; document.getElementById('users').textContent = dat.user || "0";
document.getElementById('meta').textContent = dat.meta || "0"; document.getElementById('meta').textContent = dat.meta || "0";
document.getElementById('ver-bkend').textContent = dat.ver-bkend || "Unknown";
document.getElementById('ver-dbman').textContent = dat.ver-bkend || "Unknown";
document.getElementById('ver-web').textContent = localStorage.getItem('ver-web') || "Unknown";
} }

View File

@ -2,13 +2,13 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OwlBoard - STATS</title> <title>OwlBoard - Statistics</title>
<script src="./js/lib.main.js" defer></script> <script src="./js/lib.main.js" defer></script>
<script src="./js/stat.js" defer></script> <script src="./js/stat.js" defer></script>
</head> </head>
<body style="text-align:center"> <body style="text-align:center">
<h1>OwlBoard Server Stats</h1> <h1>OwlBoard Server Stats</h1>
<h2>API Server: <span id="server_host"></span></h2> <h2>Data from: <span id="server_host"></span></h2>
<p>Counters Reset - <span id="time"></span></p> <p>Counters Reset - <span id="time"></span></p>
<table style="margin:auto;text-align:center;"> <table style="margin:auto;text-align:center;">
<tr> <tr>
@ -45,26 +45,24 @@
</tr> </tr>
</table> </table>
<br><br> <br><br>
<p>The statistics represent hits & queries from all containers in the cluster.</p> <table style="margin:auto;text-align:center;">
<table style="margin:auto;text-align:left;">
<tr> <tr>
<th>An OwlBoard Cluster consists of:</th> <th>Software</th>
<th>Version</th>
</tr> </tr>
<tr> <tr>
<td>Kubernetes environment with suitable ingress configured</td> <td>owlboard-backend</td>
<td id="ver-bkend"></td>
</tr> </tr>
<tr> <tr>
<td>At least one MongoDB database (maybe clustered across multiple instances)</td> <td>dbmanager</td>
<td id="ver-dbman"></td>
</tr> </tr>
<tr> <tr>
<td>db-manager run as a initContainer and optionally as a CronJob</td> <td>owlboard-web</td>
</tr> <td id="ver-web"></td>
<tr>
<td>At least one backend (API server)</td>
</tr>
<tr>
<td>At least one web server service (Caching is done at this level so more than one service may increase API hits)</td>
</tr> </tr>
</table> </table>
<p>The statistics represent hits & queries from all instances in the stack.</p>
</body> </body>
</html> </html>