feat: add service filter to attacker profiles

API now accepts ?service=https to filter attackers by targeted service.
Service badges are clickable in both the attacker list and detail views,
navigating to a filtered view. Active filter shows as a dismissable tag.
This commit is contained in:
2026-04-14 01:35:12 -04:00
parent 7756747787
commit 24e0d98425
6 changed files with 78 additions and 15 deletions

View File

@@ -331,7 +331,13 @@ const AttackerDetail: React.FC = () => {
</div>
<div style={{ padding: '16px', display: 'flex', flexWrap: 'wrap', gap: '8px' }}>
{attacker.services.length > 0 ? attacker.services.map((svc) => (
<span key={svc} className="service-badge" style={{ fontSize: '0.85rem', padding: '4px 12px' }}>
<span
key={svc}
className="service-badge"
style={{ fontSize: '0.85rem', padding: '4px 12px', cursor: 'pointer' }}
onClick={() => navigate(`/attackers?service=${encodeURIComponent(svc)}`)}
title={`Filter attackers by ${svc.toUpperCase()}`}
>
{svc.toUpperCase()}
</span>
)) : (