Update stats display

This commit is contained in:
Fred Boniface
2023-05-23 12:03:48 +01:00
parent 3e26bc5268
commit bdc2d83bd2
10 changed files with 92 additions and 121 deletions

View File

@@ -1,6 +1,6 @@
/* eslint-disable no-unused-vars */
/* All Page Init */
const version = '2023.5.3'
const version = '2023.5.4'
/* Feature Detectors */

View File

@@ -2,7 +2,8 @@ init()
async function init() { // The page init function
versionDisplay()
display(await get())
await display(await get())
hideLoading()
}
async function get() { // Fetch data from API
@@ -20,7 +21,7 @@ async function display(data) { // Parses and displays data from API
document.getElementById('time').textContent = await convertUnixLocal(dat.since)
document.getElementById('ldbws').textContent = dat.ldbws || '0'
document.getElementById('ldbsvws').textContent = dat.ldbsvws || '0'
document.getElementById('apicorpus').textContent = dat.corpus_api || '0'
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'