Phase 6: Verwendungs-Sicht pro Grundquelle

Backend
- /api/sources/global liefert pro Quelle articles_7d, articles_30d und
  tenant_excluded_count (eine aggregierte Query mit CTEs, kein N+1).
- Match-Logik fuer Articles: LOWER(articles.source) = LOWER(sources.name)
  - articles.source_url ist Artikel-URL, NICHT Feed-URL, daher matcht das
    nicht mit sources.url. source-Name-Match liefert sinnvolle Treffer.
- tenant_excluded_count zaehlt distinct organization_ids aus
  user_excluded_domains (per LOWER(domain)-Match).

Frontend
- dashboard.html: zwei neue sortierbare Spalten Aktivitaet (7d/30d) +
  Sperren in der Grundquellen-Tabelle.
- style.css: .activity-cell + .exclude-badge Styles (mit zero-Variante
  fuer ruhigen Look bei keiner Aktivitaet/Sperre).
- sources.js:
  - cols 9 -> 11
  - Render: 7d-Wert fett, 30d-Wert dezent, Tooltip 7 Tage / 30 Tage
  - Sort-Logik: NUMERIC_FIELDS um articles_7d/articles_30d/tenant_excluded_count
    erweitert (numerischer Compare statt localeCompare)
Dieser Commit ist enthalten in:
claude-dev
2026-05-09 03:23:42 +00:00
Ursprung 6b70a7195e
Commit e9ff2bac02
4 geänderte Dateien mit 77 neuen und 21 gelöschten Zeilen

Datei anzeigen

@@ -934,3 +934,31 @@ input[type="date"].filter-select { padding: 6px 10px; }
max-height: 240px;
}
/* === Verwendungs-Sicht (Phase 6) === */
.activity-cell {
font-variant-numeric: tabular-nums;
color: #94a3b8;
font-size: 12px;
}
.activity-cell strong {
color: #e2e8f0;
font-weight: 600;
}
.activity-cell.activity-zero {
color: #475569;
}
.exclude-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
background: rgba(239, 68, 68, 0.15);
color: #ef4444;
}
.exclude-badge.exclude-zero {
background: transparent;
color: #475569;
font-weight: 400;
}