{/* 有国旗就用国旗开头(在线、离线看右边的标签),没有再用状态点 */}
- {info?.country ? : }
- {agent.name}
- {agent.online ? '在线' : '离线'}
- {!agent.online && host?.last_seen_at ? {fmtAgo(host.last_seen_at)} : null}
+ {info?.country ? : }
+ {node.name}
+ {KIND_NAME[node.kind]}
+ {node.online ? '在线' : '离线'}
+ {!node.online && node.last_seen_at ? {fmtAgo(node.last_seen_at)} : null}
{info?.isp_name || info?.os_name || info?.tag || info?.version ? (
@@ -82,34 +92,14 @@ function Card({ agent, host, range, infos }: { agent: AgentCard; host: HostItem
) : null}
) : null}
- {agent.labels.length > 0 ? (
+ {labels.length > 0 ? (
- {agent.labels.map((x) => (
+ {labels.map((x) => (
{x}
))}
) : null}
-
- {agent.lines.map((l) => {
- const m = l.summary.metrics
- return (
-
-
-
- →
- {infos.get(l.probe_id)?.country ? : null}
- {l.probe_name}
- {infos.get(l.probe_id)?.isp_key ? : null}
-
- {!l.probe_connected && l.online ? 测量通道未建立 : {OVERVIEW_RANGES.find((r) => r.value === range)?.label ?? range}}
-
-
-
- )
- })}
-
-
{h ? (
<>
@@ -126,7 +116,7 @@ function Card({ agent, host, range, infos }: { agent: AgentCard; host: HostItem
网速
- ↑ {fmtSpeed(agent.online ? h.net_tx_bps : null)} ↓ {fmtSpeed(agent.online ? h.net_rx_bps : null)}
+ ↑ {fmtSpeed(node.online ? h.net_tx_bps : null)} ↓ {fmtSpeed(node.online ? h.net_rx_bps : null)}
@@ -140,15 +130,43 @@ function Card({ agent, host, range, infos }: { agent: AgentCard; host: HostItem
>
) : (
-
这台 Agent 没有上报主机状态
+
这台 {KIND_NAME[node.kind]} 没有上报主机状态
)}
)
}
+/** 一条线路(Probe → Agent):近一段时间的 UDP 丢包和延迟走势、TCP 的 RTT 和重传。 */
+function LineCard({ l, range, infos }: { l: OverviewLineDto; range: OverviewRange; infos: Map