Phase 4: Admin-Übersicht erweitern (Stats-Bar + Health-Badge inline + Letzter Treffer)

Backend
- routers/sources.py:
  - GET /api/sources/global/stats NEU: aggregierte Counter
    nach Typ, Total-Articles, Health-Bilanz (errors/warnings/ok)
  - GET /api/sources/global liefert pro Quelle health_status
    (worst-case error > warning > ok, NULL wenn nie gecheckt)

Frontend
- dashboard.html sub-global-sources: Stats-Bar Container oben.
  Tabellenkopf bekommt zwei neue Spalten: Letzter Treffer + Health.
- style.css: .sources-stats-bar (analog Monitor-Style),
  .health-badge mit Varianten error/warning/ok/unknown.
- sources.js:
  - loadGlobalSources lädt parallel /global + /global/stats
  - renderGlobalStats: rendert Stats-Bar mit Total-Quellen,
    Counts pro Typ (aus META), Total-Articles, Health-Counters
  - renderGlobalSources: 9 Spalten statt 7, Letzter-Treffer + Health-Badge,
    typeLabel statt TYPE_LABELS-Direktzugriff
Dieser Commit ist enthalten in:
claude-dev
2026-05-09 03:12:30 +00:00
Ursprung 9350e4538a
Commit 2001815e19
4 geänderte Dateien mit 166 neuen und 7 gelöschten Zeilen

Datei anzeigen

@@ -831,3 +831,44 @@ input[type="date"].filter-select { padding: 6px 10px; }
from { opacity: 1; transform: translateX(0); }
to { opacity: 0; transform: translateX(20px); }
}
/* === Sources Stats-Bar (Phase 4) === */
.sources-stats-bar {
display: flex;
flex-wrap: wrap;
gap: 14px;
padding: 12px 16px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
margin-bottom: 14px;
font-size: 13px;
}
.sources-stat-item {
display: inline-flex;
align-items: baseline;
gap: 6px;
color: #94a3b8;
}
.sources-stat-value {
color: #f0b429;
font-weight: 600;
font-size: 15px;
}
.sources-stat-item.health-error .sources-stat-value { color: #ef4444; }
.sources-stat-item.health-warning .sources-stat-value { color: #f59e0b; }
.sources-stat-item.health-ok .sources-stat-value { color: #10b981; }
/* Health-Badge inline in Tabellenzeile */
.health-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
}
.health-badge-error { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.health-badge-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.health-badge-ok { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.health-badge-unknown { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }