feat: rich Rspamd history viewer with score badges and symbol details
- Rspamd log type renders a structured table instead of raw JSON
- Each row shows: timestamp, sender, recipient, subject, colour-coded
score (green/amber/red relative to required threshold), action badge
- Expand button reveals a detail panel per message with:
- Meta grid: Sender SMTP/MIME, IP, size, process time, Message-ID
- Threshold strip showing all configured score boundaries
- Symbol table sorted by impact, with dashicons (warning/check/minus),
+/- score in colour, description, and option values
- Zero-score informational symbols shown dimmed at the bottom
- Other log types (postfix, dovecot, etc.) still render as before
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -418,6 +418,85 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* ── Rspamd history viewer ───────────────────────────────────── */
|
||||
.woocow-badge-blue { background: #cce5ff; color: #004085; }
|
||||
.woocow-badge-orange { background: #fff3cd; color: #856404; }
|
||||
.woocow-badge-red { background: #f8d7da; color: #721c24; }
|
||||
|
||||
.woocow-rspamd-table th,
|
||||
.woocow-rspamd-table td { vertical-align: middle; }
|
||||
.woocow-rspamd-table .woocow-actions { white-space: nowrap; }
|
||||
|
||||
.woocow-score {
|
||||
display: inline-block;
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
font-family: monospace;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.woocow-score-clean { background: #d4edda; color: #155724; }
|
||||
.woocow-score-low { background: #fff3cd; color: #856404; }
|
||||
.woocow-score-high { background: #f8d7da; color: #721c24; }
|
||||
|
||||
/* Rspamd detail panel */
|
||||
.woocow-rspamd-detail td { padding: 0 !important; background: #f9fafc !important; }
|
||||
.woocow-rspamd-symbols {
|
||||
padding: 14px 20px;
|
||||
border-top: 2px solid #e0e4ea;
|
||||
}
|
||||
.woocow-rspamd-meta {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 8px 16px;
|
||||
margin-bottom: 12px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
.woocow-rspamd-meta-item label {
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
color: #999;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.woocow-rspamd-meta-item {
|
||||
font-size: 12px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.woocow-rspamd-thresholds {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
margin: 4px 0 10px;
|
||||
}
|
||||
.woocow-rspamd-sym-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
}
|
||||
.woocow-rspamd-sym-table th {
|
||||
background: #f0f1f5;
|
||||
padding: 5px 8px;
|
||||
text-align: left;
|
||||
font-weight: 700;
|
||||
border-bottom: 1px solid #dde;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.woocow-rspamd-sym-table td {
|
||||
padding: 4px 8px;
|
||||
border-bottom: 1px solid #eef;
|
||||
vertical-align: top;
|
||||
}
|
||||
.woocow-rspamd-sym-table tr:hover td { background: #f5f7ff; }
|
||||
.woocow-rspamd-sym-table tr.sym-zero td { opacity: .55; }
|
||||
|
||||
.woocow-sym-score-pos { color: #c0392b; font-weight: 700; }
|
||||
.woocow-sym-score-neg { color: #27ae60; font-weight: 700; }
|
||||
.woocow-sym-score-zero { color: #aaa; }
|
||||
.woocow-sym-name code { font-size: 11px; background: none; padding: 0; }
|
||||
|
||||
/* ── Spam filter panel ───────────────────────────────────────── */
|
||||
.woocow-spam-panel { font-size: 13px; }
|
||||
.woocow-spam-panel input[type=range] { vertical-align: middle; }
|
||||
|
||||
Reference in New Issue
Block a user