feat(stats): surface reminder_stats in the summary chip row
The backend already fetches ReminderStats from the broker RPC and includes it in the /api/stats snapshot, but the frontend was not rendering it. Add three chips to the summary row when the field is present: reminders scheduled / delivered / pending.
This commit is contained in:
parent
d60414cde1
commit
0d32048abe
1 changed files with 7 additions and 0 deletions
|
|
@ -92,6 +92,13 @@ window.Chart = Chart;
|
||||||
['p95 duration', fmtMs(s.duration_summary.p95_ms)],
|
['p95 duration', fmtMs(s.duration_summary.p95_ms)],
|
||||||
['window', s.window],
|
['window', s.window],
|
||||||
];
|
];
|
||||||
|
if (s.reminder_stats) {
|
||||||
|
chips.push(
|
||||||
|
['reminders scheduled', fmtInt(s.reminder_stats.scheduled)],
|
||||||
|
['reminders delivered', fmtInt(s.reminder_stats.delivered)],
|
||||||
|
['reminders pending', fmtInt(s.reminder_stats.pending)],
|
||||||
|
);
|
||||||
|
}
|
||||||
for (const [label, value] of chips) {
|
for (const [label, value] of chips) {
|
||||||
const chip = document.createElement('span');
|
const chip = document.createElement('span');
|
||||||
chip.className = 'chip';
|
chip.className = 'chip';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue