完善直播节点监控与边缘代理

This commit is contained in:
admin committed 2026-08-12 21:14:42 +08:00
1 parent 058bb4b99f
commit 20cd99efa4
19 files changed
+401 -47

No files matched your search

+7
View File
@@ -26,6 +26,8 @@ func onReady(ag *agent.Agent) {
mStatus := systray.AddMenuItem("Node: "+ag.NodeID(), "Node")
mStatus.Disable()
mConnection := systray.AddMenuItem("Connection: connecting", "Master connection")
mConnection.Disable()
systray.AddSeparator()
@@ -46,6 +48,11 @@ func onReady(ag *agent.Agent) {
for {
select {
case <-ticker.C:
if ag.Connected() {
mConnection.SetTitle("Connection: connected")
} else {
mConnection.SetTitle("Connection: disconnected")
}
m := ag.Metrics()
mCPU.SetTitle(fmt.Sprintf("CPU: %.1f%%", m.CPU))
mMem.SetTitle(fmt.Sprintf("MEM: %.1f%%", m.Memory))