Add timetable count to stats

This commit is contained in:
Fred Boniface 2023-05-24 09:33:37 +01:00
parent 20a17e8dd0
commit 2433671d85
2 changed files with 8 additions and 5 deletions

View File

@ -26,7 +26,8 @@ async function display(data) { // Parses and displays data from API
document.getElementById('stations').textContent = dat.stations || '0'
document.getElementById('users').textContent = dat.users || '0'
document.getElementById('meta').textContent = dat.meta || '0'
document.getElementById('pis').textContent = dat.pis
document.getElementById('pis').textContent = dat.pis || '0'
document.getElementById('timetable_count').textContent = data.count.timetable || '0'
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'

View File

@ -52,8 +52,8 @@
</p>
<h3>Usage Statistics</h3>
<p class="stat_desc">
LDBWS Lookups: <span class="stat_result" id="ldbws"></span><br>
LDBSVWS Lookups: <span class="stat_result" id="ldbsvws"></span><br>
Upstream LDBWS Lookups: <span class="stat_result" id="ldbws"></span><br>
Upstream LDBSVWS Lookups: <span class="stat_result" id="ldbsvws"></span><br>
Upstream CORPUS Fetches: <span class="stat_result" id="corpus_api"></span><br>
CORPUS DB Lookups: <span class="stat_result" id="corpus"></span><br>
Stations DB Lookups: <span class="stat_result" id="stations"></span><br>
@ -63,11 +63,13 @@
</p>
<h3>DB Counts</h3>
<p class="stat_desc">
Registered Users: <span class="stat_result" id="user_count"></span><br>
Extarnal Registered Users: <span class="stat_result" id="user_count"></span><br>
Pending Registrations: <span class="stat_result" id="reg_count"></span><br>
Available PIS Codes: <span class="stat_result" id="pis_count"></span><br>
Available CORPUS Entries: <span class="stat_result" id="corpus_count"></span><br>
Available Station Entries: <span class="stat_result" id="stations_count"></span></p>
Available Station Entries: <span class="stat_result" id="stations_count"></span><br>
Services in local timetable: <span class="stat_result" id="timetable_count"></span>
</p>
<!-- Footer -->
<footer>
<p>&copy; Fred Boniface 2023</p>