From c8d8dc5736031a766bd7c023ec75689a9833e654 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 23 May 2023 23:52:55 +0100 Subject: [PATCH] Add stats to cache --- js/lib.main.js | 2 +- js/stats.js | 2 +- stats.html | 2 +- sw.js | 7 +++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/js/lib.main.js b/js/lib.main.js index b7bbf70..7d7b3a3 100644 --- a/js/lib.main.js +++ b/js/lib.main.js @@ -1,6 +1,6 @@ /* eslint-disable no-unused-vars */ /* All Page Init */ -const version = '2023.5.5' +const version = '2023.5.6' /* Feature Detectors */ diff --git a/js/stats.js b/js/stats.js index 099d78b..b3214a5 100644 --- a/js/stats.js +++ b/js/stats.js @@ -24,7 +24,7 @@ async function display(data) { // Parses and displays data from API document.getElementById('corpus_api').textContent = dat.corpus_api || '0' document.getElementById('corpus').textContent = dat.corpus || '0' document.getElementById('stations').textContent = dat.stations || '0' - document.getElementById('users').textContent = dat.user || '0' + document.getElementById('users').textContent = dat.users || '0' document.getElementById('meta').textContent = dat.meta || '0' document.getElementById('pis').textContent = dat.pis document.getElementById('ver-dbman').textContent = ver.dbmanager || 'Unknown' diff --git a/stats.html b/stats.html index dab226d..2fa6b12 100644 --- a/stats.html +++ b/stats.html @@ -41,7 +41,7 @@ OwlBoard Logo

Statistics

-

Server hostname:
+

API Server:
Runtime Mode:
Statistics Reset:

diff --git a/sw.js b/sw.js index 48eba33..e57edfe 100644 --- a/sw.js +++ b/sw.js @@ -1,6 +1,6 @@ /* Service Worker */ -const swVersion = '2023.5.5-1' +const swVersion = '2023.5.6-1' const cacheName = `owlboard-${swVersion}` const cacheIDs = [cacheName] let staticCache = [ @@ -34,6 +34,7 @@ const dynamicCache = [ '/find-code.html', '/settings.html', '/pis.html', + 'stats.html', '/manifest.json', '/styles/board.css', '/styles/find-code.css', @@ -42,6 +43,7 @@ const dynamicCache = [ '/styles/main.css', '/styles/settings.css', '/styles/pis.css', + '/styles/stats.css', '/js/find-code.js', '/js/index.js', '/js/issue.js', @@ -50,7 +52,8 @@ const dynamicCache = [ '/js/auth.js', '/js/settings.js', '/js/simple-board.js', - '/js/pis.js' + '/js/pis.js', + '/js/stats.js' ] for(let i = 0; i < dynamicCache.length; i++) {