refactor(decnet_web/AttackerDetail): extract ServicesTargeted section
Lift the SERVICES TARGETED collapsible — interactive two-tone badge chips with click-to-filter — into its own section. The selection state was already lifted into useAttackerDetail in the prior commits, so the section just consumes serviceFilter / setServiceFilter as props. - New AttackerDetail/sections/ServicesTargeted.tsx - ServicesTargeted.test.tsx covers badge rendering, empty state, inactive-click-sets-filter, and active-click-clears-filter - AttackerFixture grows ip_leaks/ip_leaks_total fields so the TimelineSection rotation test (added in the prior commit) keeps passing under the new factory shape
This commit is contained in:
13
decnet_web/src/test/fixtures/attacker.ts
vendored
13
decnet_web/src/test/fixtures/attacker.ts
vendored
@@ -25,6 +25,19 @@ export interface AttackerFixture {
|
||||
behavior: null;
|
||||
service_activity: { interacted: string[]; scanned: string[] };
|
||||
observations: never[];
|
||||
ip_leaks?: Array<{
|
||||
timestamp: string;
|
||||
decky?: string;
|
||||
service?: string;
|
||||
bounty_type: string;
|
||||
payload: {
|
||||
source_ip?: string;
|
||||
real_ip_claim?: string;
|
||||
source_header?: string;
|
||||
headers_seen?: Record<string, string>;
|
||||
};
|
||||
}>;
|
||||
ip_leaks_total?: number;
|
||||
}
|
||||
|
||||
export const makeAttacker = (overrides: Partial<AttackerFixture> = {}): AttackerFixture => ({
|
||||
|
||||
Reference in New Issue
Block a user