From 712ec3b635c4ae82b7d8cc07354c3ac0b2c43ad6 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Fri, 30 Jan 2026 18:22:40 -0800 Subject: [PATCH] Show date and time on separate lines in perf dashboard card Co-Authored-By: Claude Opus 4.5 --- api/admin/perf-dashboard.cfm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/admin/perf-dashboard.cfm b/api/admin/perf-dashboard.cfm index 1eb10bb..61469fc 100644 --- a/api/admin/perf-dashboard.cfm +++ b/api/admin/perf-dashboard.cfm @@ -30,7 +30,7 @@ if (remoteAddr != "127.0.0.1" && remoteAddr != "::1" && remoteAddr != "0:0:0:0:0 .card .label { font-size: 11px; color: #8b949e; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; } .card .value { font-size: 28px; font-weight: 700; color: #fff; } .card .unit { font-size: 13px; color: #8b949e; font-weight: 400; } - .card.card-wide { min-width: 200px; } + .card .sub { font-size: 13px; color: #8b949e; font-weight: 400; } .section { margin-bottom: 28px; } .section h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #c9d1d9; display: flex; align-items: center; gap: 8px; } @@ -137,7 +137,7 @@ function fmtDate(s) { var mo = d.getMonth() + 1, dy = d.getDate(), yr = String(d.getFullYear()).slice(-2); var h = d.getHours(), mi = String(d.getMinutes()).padStart(2, '0'), ap = h >= 12 ? 'p' : 'a'; h = h % 12 || 12; - return mo + '/' + dy + '/' + yr + ' ' + h + ':' + mi + ap; + return { date: mo + '/' + dy + '/' + yr, time: h + ':' + mi + ap }; } function fmtMs(n) { if (n == null) return '-'; @@ -201,7 +201,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') + - cardWide('Data Since', fmtDate(s.FirstLog)); + cardDate('Data Since', fmtDate(s.FirstLog)); qs('#summarySection').style.display = ''; // Count table @@ -225,8 +225,9 @@ async function loadAll() { function card(label, value, unit) { return '
' + label + '
' + value + ' ' + unit + '
'; } -function cardWide(label, value) { - return '
' + label + '
' + value + '
'; +function cardDate(label, dt) { + if (!dt || !dt.date) return card(label, 'none', ''); + return '
' + label + '
' + dt.date + '
' + dt.time + '
'; } function renderCountTable(data) {