>('/api/admin/probes'), [], 8000)
const { busy, run } = useAction()
const items = matrix.data?.items ?? []
+ const onlineByProbe = new Map((probeState.data?.items ?? []).map((probe) => [probe.id, probe.online]))
const probes = [...new Map(items.map((i) => [i.probe_id, i.probe_name])).entries()]
const agents = [...new Map(items.map((i) => [i.agent_id, i.agent_name])).entries()]
const cell = (probeId: string, agentId: string) => items.find((i) => i.probe_id === probeId && i.agent_id === agentId)
@@ -58,12 +60,20 @@ function LinkMatrix() {
{agents.map(([agentId]) => {
const link = cell(probeId, agentId)
if (!link) return |
+ const probeOnline = onlineByProbe.get(probeId)
const tone = link.connected ? 'ok' : link.linked ? 'warn' : ''
- const text = link.connected ? '已连接' : link.linked ? '待连接' : '不连'
+ const text = link.connected ? '已连接' : !link.linked ? '不连' : probeOnline === false ? 'Probe 离线' : '待连接'
+ const statusHint = link.connected
+ ? 'Probe 已和 Agent 建立测量会话'
+ : !link.linked
+ ? '这条线路已关闭'
+ : probeOnline === false
+ ? 'Probe 当前没有连接到面板;Probe 上线后才会尝试连接 Agent'
+ : '线路已启用,等待 Probe 与 Agent 建立测量会话'
return (
- |