Improve port-traffic logs and add manual NE rebind.

Fix unreadable collect-log contrast, surface errors on the Logs button, and let operators re-link a monitor to a chosen inventory NE without wiping samples.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-02 12:52:26 +08:00
parent a6c7267b47
commit 3f0787da11
9 changed files with 537 additions and 60 deletions

View file

@ -1305,6 +1305,12 @@ export const collectPortTrafficNow = (deviceId: string) =>
export const deletePortTrafficDevice = (deviceId: string) =>
apiDelete<{ ok: boolean; id: string }>(`/v1/port-traffic/devices/${encodeURIComponent(deviceId)}`);
export const rebindPortTrafficDevice = (deviceId: string, body: { ne_id: string }) =>
apiPost<PortTrafficDevice>(
`/v1/port-traffic/devices/${encodeURIComponent(deviceId)}/rebind`,
body,
);
export const fetchPortTrafficTargets = (deviceId: string) =>
apiGet<{ items: PortTrafficTarget[] }>(
`/v1/port-traffic/devices/${encodeURIComponent(deviceId)}/targets`,