diff --git a/atsf_server/web/features/dashboard/components/world-stage.tsx b/atsf_server/web/features/dashboard/components/world-stage.tsx index d9725968..74c08012 100644 --- a/atsf_server/web/features/dashboard/components/world-stage.tsx +++ b/atsf_server/web/features/dashboard/components/world-stage.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; +import { EmptyState } from '@/components/feedback/empty-state'; import { StatusBadge } from '@/components/ui/status-badge'; import type { DashboardConfig, @@ -117,6 +118,22 @@ function HeroMetric({ ); } +function SignalLegend() { + return ( +
- {node.name} -
-- {(node.geo_name || node.name) + ' · '} - 请求 {node.request_count.toLocaleString('zh-CN')} · 异常{' '} - {node.active_event_count} -
- {!anchor.derivedFromGeo ? ( -- 未配置经纬度,当前使用备用落点 + {signalNodes.length === 0 ? ( +
+ {node.name}
- ) : null} ++ {(node.geo_name || node.name) + ' · '} + 请求 {node.request_count.toLocaleString('zh-CN')} · 异常{' '} + {node.active_event_count} +
+ {!anchor.derivedFromGeo ? ( ++ 未配置经纬度,当前使用备用落点 +
+ ) : null} ++ {label} +
++ {value} +
+{hint}
+- 网络流量 + OpenResty 吞吐 +
++ 入站: + {formatBytes(latestMetricSnapshot.openresty_rx_bytes)} +
++ 出站: + {formatBytes(latestMetricSnapshot.openresty_tx_bytes)} +
++ 节点网络
@@ -840,99 +971,48 @@ export function NodeDetailPage({ nodeId }: { nodeId: string }) {
- 磁盘 IO + 最近窗口请求 +
++ {trafficSummary + ? trafficSummary.request_count.toLocaleString('zh-CN') + : '—'} +
++ {trafficSummary + ? `QPS ${trafficSummary.estimated_qps.toFixed(1)} · UV ${trafficSummary.unique_visitor_count}` + : '暂无窗口流量摘要'} +
++ 最近窗口错误 +
++ {trafficSummary + ? trafficSummary.error_count.toLocaleString('zh-CN') + : '—'} +
++ {trafficSummary + ? `错误率 ${trafficSummary.error_rate_percent.toFixed(1)}%` + : '暂无错误率摘要'}
-- 读取: - {formatBytes(latestMetricSnapshot.disk_read_bytes)} -
-- 写入: - {formatBytes(latestMetricSnapshot.disk_write_bytes)} -
-- 最近心跳: - {isMeaningfulTime(node.last_seen_at) - ? ` ${formatRelativeTime(node.last_seen_at)} · ${formatDateTime(node.last_seen_at)}` - : ' 暂无'} -
-IP:{node.ip || '暂无'}
-当前配置:{node.current_version || '未应用'}
- {latestTrafficReport ? ( -- 最近窗口请求:{latestTrafficReport.request_count} · UV{' '} - {latestTrafficReport.unique_visitor_count} · 错误{' '} - {latestTrafficReport.error_count} -
- ) : null} -- {event.message || '暂无详细消息'} -
-