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:
@@ -298,6 +298,7 @@
|
||||
|
||||
<!-- Grundquellen -->
|
||||
<div class="section active" id="sub-global-sources">
|
||||
<div class="sources-stats-bar" id="globalStatsBar"></div>
|
||||
<div class="action-bar">
|
||||
<div style="display:flex;align-items:center;gap:12px;flex-wrap:wrap;">
|
||||
<input type="text" class="search-input" id="globalSourceSearch" placeholder="Grundquelle suchen...">
|
||||
@@ -327,6 +328,8 @@
|
||||
<th class="sortable" data-sort="domain" onclick="sortGlobalSources('domain')">Domain <span class="sort-icon"></span></th>
|
||||
<th class="sortable" data-sort="source_type" onclick="sortGlobalSources('source_type')">Typ <span class="sort-icon"></span></th>
|
||||
<th class="sortable" data-sort="article_count" onclick="sortGlobalSources('article_count')">Artikel <span class="sort-icon"></span></th>
|
||||
<th class="sortable" data-sort="last_seen_at" onclick="sortGlobalSources('last_seen_at')">Letzter Treffer <span class="sort-icon"></span></th>
|
||||
<th class="sortable" data-sort="health_status" onclick="sortGlobalSources('health_status')">Health <span class="sort-icon"></span></th>
|
||||
<th class="sortable" data-sort="status" onclick="sortGlobalSources('status')">Status <span class="sort-icon"></span></th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren