Format date display in perf dashboard (Jan 29, 2026 8:46 PM)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-01-30 18:08:07 -08:00
parent bc88f28e60
commit cf1c6497ca

View file

@ -129,6 +129,12 @@ let refreshTimer = null;
function qs(s) { return document.querySelector(s); }
function fmt(n) { return n == null ? '-' : Number(n).toLocaleString(); }
function fmtDate(s) {
if (!s || s === 'none') return 'none';
var d = new Date(s.replace(' ', 'T'));
if (isNaN(d)) return s;
return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }) + ' ' + d.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit', hour12: true });
}
function fmtMs(n) {
if (n == null) return '-';
n = Number(n);
@ -191,7 +197,7 @@ async function loadAll() {
card('Avg DB Time', s.OverallAvgDbMs || 0, 'ms') +
card('Avg App Time', s.OverallAvgAppMs || 0, 'ms') +
card('Avg Queries', s.OverallAvgQueries || 0, '/req') +
card('Data Since', s.FirstLog || 'none', '');
card('Data Since', fmtDate(s.FirstLog), '');
qs('#summarySection').style.display = '';
// Count table