diff --git a/web/display/src/LineStrips.tsx b/web/display/src/LineStrips.tsx index 5fecb08..2067878 100644 --- a/web/display/src/LineStrips.tsx +++ b/web/display/src/LineStrips.tsx @@ -24,13 +24,16 @@ const clock = (ms: number, showDate: boolean) => new Date(ms).toLocaleString('zh interface Props { lineId: string + /** 拨号方和监听方的名字:去程是拨号方到监听方,回程反过来。 */ + dialer: string + listener: string range: OverviewRange /** 所选时间范围的汇总(左上、右上的数字)。 */ m: Record } -/** 一条线路的 QUIC/TCP 摘要:RTT 是往返(⇄);去程是拨号方到监听方(→),回程反过来(←);QUIC 看各方向丢包,TCP 看各方向重传,都配质量点阵。 */ -export function LineStrips({ lineId, range, m }: Props) { +/** 一条线路的 QUIC/TCP 摘要:RTT 是往返(⇄);每个方向一行,写明是「拨号方 → 监听方」还是反过来;QUIC 看各方向丢包,TCP 看各方向重传,都配质量点阵。 */ +export function LineStrips({ lineId, dialer, listener, range, m }: Props) { const info = OVERVIEW_RANGES.find((r) => r.value === range) ?? OVERVIEW_RANGES[0] const series = useQuery( () => api.get(`/api/public/lines/${encodeURIComponent(lineId)}/series`, { range: info.value, anchor: 'now', step: info.step, preset: 'quic,tcp', metrics: 'loss.up,loss.down,loss.total,rtt.p50,rtt.p95,rtt.p99,tcp.retrans.up,tcp.retrans.down,tcp.rtt.p50' }), @@ -75,7 +78,7 @@ export function LineStrips({ lineId, range, m }: Props) {
- 去程 → + {dialer} → {listener} {upText}
@@ -86,7 +89,7 @@ export function LineStrips({ lineId, range, m }: Props) {
- 回程 ← + {listener} → {dialer} {downText}
@@ -102,7 +105,7 @@ export function LineStrips({ lineId, range, m }: Props) {
- 去程 → + {dialer} → {listener} {retransText(retransUpValue)}
@@ -113,7 +116,7 @@ export function LineStrips({ lineId, range, m }: Props) {
- 回程 ← + {listener} → {dialer} {retransText(retransDownValue)}
diff --git a/web/display/src/display.css b/web/display/src/display.css index ddccba0..440fcb4 100644 --- a/web/display/src/display.css +++ b/web/display/src/display.css @@ -1437,6 +1437,12 @@ margin-left: auto; } +.line-mini-direction-head > .line-mini-direction-name { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; +} + .line-mini-tcp { margin-top: 2px; padding-top: 5px; diff --git a/web/display/src/pages/Overview.tsx b/web/display/src/pages/Overview.tsx index 1f4463c..946ad1b 100644 --- a/web/display/src/pages/Overview.tsx +++ b/web/display/src/pages/Overview.tsx @@ -136,7 +136,7 @@ function NodeCard({ node, labels, infos }: { node: HostItem; labels: string[]; i ) } -/** 一条线路(拨号方 ⇄ 监听方):RTT 是往返;去程是拨号方到监听方(左到右),回程是监听方到拨号方(右到左)。QUIC 看两个方向的丢包,TCP 看两个方向的重传。 */ +/** 一条线路(拨号方 ⇄ 监听方):RTT 是往返;下面每个方向一行,写明是 A → B 还是 B → A(A 是拨号方)。QUIC 看两个方向的丢包,TCP 看两个方向的重传。 */ function LineCard({ l, range, infos }: { l: OverviewLineDto; range: OverviewRange; infos: Map }) { const dialerInfo = infos.get(l.dialer_id) const agentInfo = infos.get(l.agent_id) @@ -159,7 +159,7 @@ function LineCard({ l, range, infos }: { l: OverviewLineDto; range: OverviewRang {dialerInfo?.country ? : null} {l.dialer_name} {dialerInfo?.isp_key ? : null} - ⇄ + ⇄ {agentInfo?.country ? : null} {l.name} @@ -170,7 +170,7 @@ function LineCard({ l, range, infos }: { l: OverviewLineDto; range: OverviewRang {connectionIssue ? `${connectionIssue} · ${rangeLabel}` : rangeLabel}
- + ) }