mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 21:50:47 +08:00
Add named multi-panel traffic boards with dedicated wall tabs.
Persist board/panel layouts server-side, open each board outside the network shell so workbench reloads do not refresh walls, and fix mapped-baseline chart overlay plus fullscreen fit. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
214bc56774
commit
00d3e95e2d
22 changed files with 1923 additions and 345 deletions
|
|
@ -34,6 +34,9 @@ import type {
|
|||
PortTrafficDevice,
|
||||
PortTrafficDiscoverResponse,
|
||||
PortTrafficEvent,
|
||||
PortTrafficBoard,
|
||||
PortTrafficBoardPanelIn,
|
||||
PortTrafficBoardSummary,
|
||||
PortTrafficIfaceIn,
|
||||
PortTrafficSamples,
|
||||
PortTrafficTarget,
|
||||
|
|
@ -904,3 +907,31 @@ export const fetchPortTrafficCompare = (params: {
|
|||
if (params.to) p.set("to", params.to);
|
||||
return apiGet<PortTrafficCompare>(`/v1/port-traffic/compare?${p.toString()}`);
|
||||
};
|
||||
|
||||
export const fetchPortTrafficBoards = () =>
|
||||
apiGet<{ items: PortTrafficBoardSummary[] }>("/v1/port-traffic/boards");
|
||||
|
||||
export const fetchPortTrafficBoard = (boardId: string) =>
|
||||
apiGet<PortTrafficBoard>(`/v1/port-traffic/boards/${encodeURIComponent(boardId)}`);
|
||||
|
||||
export const createPortTrafficBoard = (body: {
|
||||
name: string;
|
||||
remark?: string;
|
||||
cols?: number;
|
||||
panels?: PortTrafficBoardPanelIn[];
|
||||
}) => apiPost<PortTrafficBoard>("/v1/port-traffic/boards", body);
|
||||
|
||||
export const updatePortTrafficBoard = (
|
||||
boardId: string,
|
||||
body: { name?: string; remark?: string; cols?: number },
|
||||
) => apiPatch<PortTrafficBoard>(`/v1/port-traffic/boards/${encodeURIComponent(boardId)}`, body);
|
||||
|
||||
export const putPortTrafficBoardPanels = (boardId: string, panels: PortTrafficBoardPanelIn[]) =>
|
||||
apiPut<PortTrafficBoard>(`/v1/port-traffic/boards/${encodeURIComponent(boardId)}/panels`, {
|
||||
panels,
|
||||
});
|
||||
|
||||
export const deletePortTrafficBoard = (boardId: string) =>
|
||||
apiDelete<{ ok: boolean; id: string }>(
|
||||
`/v1/port-traffic/boards/${encodeURIComponent(boardId)}`,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue