From c463ffbb1e74c8cc7449df0a1ff16f1e724bcf66 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 7 May 2023 21:18:04 +0100 Subject: [PATCH] Upgrade stats page (!3) Add additional stats to the page Reviewed-on: https://git.fjla.uk/OwlBoard/web/pulls/3 --- js/lib.main.js | 2 +- js/stat.js | 5 +++++ stat.html | 26 ++++++++++++++++++++++++++ sw.js | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/js/lib.main.js b/js/lib.main.js index 6c15c6b..60d68c8 100644 --- a/js/lib.main.js +++ b/js/lib.main.js @@ -1,5 +1,5 @@ /* All Page Init */ -const version = '2.0.0' +const version = '2.0.1' /* Feature Detectors */ diff --git a/js/stat.js b/js/stat.js index c4ccc89..050e4ef 100644 --- a/js/stat.js +++ b/js/stat.js @@ -27,4 +27,9 @@ async function display(data) { // Parses and displays data from API document.getElementById('meta').textContent = dat.meta || '0' document.getElementById('pis').textContent = dat.pis document.getElementById('ver-dbman').textContent = ver.dbmanager || 'Unknown' + document.getElementById('user_count').textContent = data.count.users || 'Unknown' + document.getElementById('reg_count').textContent = data.count.reg || '0' + document.getElementById('pis_count').textContent = data.count.pis || 'Unknown' + document.getElementById('corpus_count').textContent = data.count.corpus || 'Unknown' + document.getElementById('stations_count').textContent = data.count.stations || 'Unknown' } \ No newline at end of file diff --git a/stat.html b/stat.html index 148f449..7f0c3d6 100644 --- a/stat.html +++ b/stat.html @@ -50,6 +50,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
DatabaseEntry Count
Users
Pending Registrations
PIS Codes
CORPUS Entries
Station Codes


diff --git a/sw.js b/sw.js index 241fe28..2c8149a 100644 --- a/sw.js +++ b/sw.js @@ -1,6 +1,6 @@ /* Service Worker */ -const swVersion = '2.0.0-20230506' +const swVersion = '2.0.1-20230507' const cacheName = `owlboard-${swVersion}` const cacheIDs = [cacheName] let staticCache = [