feat: bandwidth test auto-manages server on target managed device
Backend: accept target_device_id — connect to target, enable btest server, run test from source using target credentials, disable server in finally (even on failure). Manual IP mode preserved as fallback. Frontend: device picker dropdown (all managed devices except self) as default mode; toggle to Manual IP for non-managed targets with a warning that the server must be pre-enabled. Results show target IP in labels. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a1788238f8
commit
8d24b0b998
@@ -337,9 +337,9 @@ export const deviceToolsApi = {
|
||||
api.post<{ success: boolean; message: string }>(`/devices/${id}/tools/wol`, body, { timeout: TOOL_TIMEOUT }),
|
||||
capture: (id: number, body: { interface?: string; filter_ip?: string; duration?: number }) =>
|
||||
api.post(`/devices/${id}/tools/capture`, body, { timeout: 120_000, responseType: 'blob' }),
|
||||
btest: (id: number, body: { address: string; direction?: string; duration?: number; protocol?: string }) =>
|
||||
api.post<{ tx_mbps: number; rx_mbps: number; direction: string; protocol: string; duration: number; raw: Record<string, string> | null }>(
|
||||
`/devices/${id}/tools/btest`, body, { timeout: 60_000 }
|
||||
btest: (id: number, body: { target_device_id?: number; address?: string; direction?: string; duration?: number; protocol?: string }) =>
|
||||
api.post<{ tx_mbps: number; rx_mbps: number; direction: string; protocol: string; duration: number; target_ip: string; raw: Record<string, string> | null }>(
|
||||
`/devices/${id}/tools/btest`, body, { timeout: 75_000 }
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user