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() {
await loadQuickLinks();
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){

View File

@ -22,4 +22,7 @@ async function display(data) {
document.getElementById('stations').textContent = dat.stations || "0";
document.getElementById('users').textContent = dat.user || "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">
<head>
<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/stat.js" defer></script>
</head>
<body style="text-align:center">
<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>
<table style="margin:auto;text-align:center;">
<tr>
@ -45,26 +45,24 @@
</tr>
</table>
<br><br>
<p>The statistics represent hits & queries from all containers in the cluster.</p>
<table style="margin:auto;text-align:left;">
<table style="margin:auto;text-align:center;">
<tr>
<th>An OwlBoard Cluster consists of:</th>
<th>Software</th>
<th>Version</th>
</tr>
<tr>
<td>Kubernetes environment with suitable ingress configured</td>
<td>owlboard-backend</td>
<td id="ver-bkend"></td>
</tr>
<tr>
<td>At least one MongoDB database (maybe clustered across multiple instances)</td>
<td>dbmanager</td>
<td id="ver-dbman"></td>
</tr>
<tr>
<td>db-manager run as a initContainer and optionally as a CronJob</td>
</tr>
<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>
<td>owlboard-web</td>
<td id="ver-web"></td>
</tr>
</table>
<p>The statistics represent hits & queries from all instances in the stack.</p>
</body>
</html>