feat: clickable WAF event rows with detail drawer
- WafEvent model: expose rawData field from DB - DataTable: add optional onRowClick prop with hover cursor - WafEventsClient: clicking a row opens a right-side drawer showing all event fields plus the raw Coraza audit JSON (pretty-printed) Safety: rawData is rendered via JSON.stringify into a <pre> element, never via dangerouslySetInnerHTML, so attack payloads are displayed as inert text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ export type WafEvent = {
|
||||
ruleId: number | null;
|
||||
ruleMessage: string | null;
|
||||
severity: string | null;
|
||||
rawData: string | null;
|
||||
};
|
||||
|
||||
function buildSearch(search?: string) {
|
||||
@@ -53,5 +54,6 @@ export async function listWafEvents(limit = 50, offset = 0, search?: string): Pr
|
||||
ruleId: r.ruleId ?? null,
|
||||
ruleMessage: r.ruleMessage ?? null,
|
||||
severity: r.severity ?? null,
|
||||
rawData: r.rawData ?? null,
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user