mirror of
https://github.com/ParrotXray/Mantis.git
synced 2026-08-24 18:50:28 +09:00
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:
parent
799f465121
commit
9dbc6424a9
32
.research/frontend-refactor/config.ts
Normal file
32
.research/frontend-refactor/config.ts
Normal 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;
|
||||
Loading…
x
Reference in New Issue
Block a user