feat(infrastructure): show notice when network charts have zero traffic

When Capture runs inside a container (typical for Docker Desktop), the
only visible interfaces are loopback, so every bytes_sent/bytes_recv
counter is zero and the charts render as flat lines without any
explanation. Users couldn't tell whether Capture was unreachable, the
monitor was broken, or there was just genuinely no traffic.

Detect the case where checks exist (chart configs were built) but every
interface across every check reports zero bytesSentPerSecond and
deltaBytesRecv, and render a NoticeBanner above the chart grid
explaining it and suggesting Capture be run on the host.

Adds pages.infrastructure.charts.labels.netNoTraffic to all 16 locales.
This commit is contained in:
gorkem-bwl committed 2026-04-28 23:57:14 -04:00
1 parent fef3f2c294
commit c89dbebe98
17 files changed
+80 -48

No files matched your search

+2 -1
View File
@@ -769,6 +769,7 @@
"memory": "内存使用率",
"netBytesRecv": "{{name}} - 接收字节",
"netBytesSent": "{{name}} - 发送字节",
"netNoTraffic": "Capture 报告所有接口的流量均为零。当 Capture 在只能看到回环接口的容器内运行时,这属于正常情况——请直接在主机上运行 Capture 才能看到真实的网络活动。",
"temp": "温度"
}
},
@@ -1237,7 +1238,7 @@
},
"removeMonitors": {
"title": "系统重置",
"description": "从系统中移除所有监控。",
"description": "从系统中移除所有监视器。",
"dialog": {
"title": "移除所有监控?",
"description": "此操作无法撤销。"