aboutsummaryrefslogtreecommitdiff
path: root/api/debug/dashboard.php
diff options
context:
space:
mode:
Diffstat (limited to 'api/debug/dashboard.php')
-rw-r--r--api/debug/dashboard.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/api/debug/dashboard.php b/api/debug/dashboard.php
index c235ec0..74ba3af 100644
--- a/api/debug/dashboard.php
+++ b/api/debug/dashboard.php
@@ -5,7 +5,9 @@ header('Content-Type: text/html; charset=utf-8');
$errors = load_json(ERRORS_FILE);
$sessions = load_json(SESSIONS_FILE);
-$totalErrors = count($errors);
+$uniqueErrors = count($errors);
+$totalOccurrences = array_sum(array_map(fn($e) => (int)($e['count'] ?? 1), $errors));
+$lastIngest = $errors ? max(array_column($errors, 'ingested_at')) : null;
$totalSessions = count($sessions);
$byType = [];
$bySeverity = [];
@@ -91,8 +93,10 @@ if ($lastSync): ?>
<div class="grid">
<div class="card">
- <h3>Total Errors</h3>
- <div class="stat-value <?= $totalErrors > 0 ? 'error' : 'ok' ?>"><?= $totalErrors ?></div>
+ <h3>Total Occurrences</h3>
+ <div class="stat-value <?= $totalOccurrences > 0 ? 'error' : 'ok' ?>"><?= $totalOccurrences ?></div>
+ <div class="muted" style="font-size:.75em;color:var(--muted)"><?= $uniqueErrors ?> unique signatures</div>
+ <div class="muted" style="font-size:.75em;color:var(--muted)">last ingest: <?= $lastIngest ? htmlspecialchars($lastIngest) : '—' ?></div>
</div>
<div class="card">
<h3>Sessions</h3>