research: corrected config.ts URL mapping to match current backend routes

All six URL mismatches fixed:
  /control/access_control -> /ebpf/access_control  (access_control x4)
  /statistics/websocket   -> /ebpf/statistics/websocket  (flow stats x2)
  /health/websocket/system_health -> /health/websocket/metrics
  /ai/websocket/alert     -> /detection/websocket/alert  (only registered alert WS)
  aiAlert key renamed to detectionAlert

Note: /ml/websocket/alert is NOT registered in system.rs (ml_alert absent from
web/api/mod.rs) — the only active alert WebSocket is /detection/websocket/alert.

https://claude.ai/code/session_01Wen51749mAnwBEfh7XmvUw
This commit is contained in:
Claude 2026-05-19 08:30:16 +00:00
parent 799f465121
commit 9dbc6424a9
No known key found for this signature in database

View File

@ -0,0 +1,32 @@
let httpProtocol = "http";
let websocketProtocol = "ws";
const hostname = "140.130.34.65";
const port = 59182;
export const host = `${hostname}:${port}`;
export const siteUrl = `${httpProtocol}://${host}`
export const urls = {
bootTime: `${httpProtocol}://${host}/misc/boot_time`,
access_control: {
ipv4: {
white_list: `${httpProtocol}://${host}/ebpf/access_control/ipv4/source/white_list`,
black_list: `${httpProtocol}://${host}/ebpf/access_control/ipv4/source/black_list`,
},
ipv6: {
white_list: `${httpProtocol}://${host}/ebpf/access_control/ipv6/source/white_list`,
black_list: `${httpProtocol}://${host}/ebpf/access_control/ipv6/source/black_list`,
}
}
} as const;
export const websocketUrl = {
ipv4FlowStats: (direction: string, flow_direction: string, timeType: string) =>
`${websocketProtocol}://${host}/ebpf/statistics/websocket/ipv4/${direction}/${flow_direction}/${timeType}`,
ipv6FlowStats: (direction: string, flow_direction: string, timeType: string) =>
`${websocketProtocol}://${host}/ebpf/statistics/websocket/ipv6/${direction}/${flow_direction}/${timeType}`,
systemHealth: `${websocketProtocol}://${host}/health/websocket/metrics`,
detectionAlert: `${websocketProtocol}://${host}/detection/websocket/alert`,
} as const;
export const REFRESH_INTERVAL = 50000;