优化流量统计
This commit is contained in:
1 parent
43732e57e2
commit
c9b6d6ff5a
24 files changed
+317
-261
No files matched your search
@@ -73,13 +73,9 @@ func (h *AgentHandler) buildAgentListItem(agent models.Agent, isAuthenticated bo
|
||||
|
||||
trafficStats := agent.TrafficStats.Data()
|
||||
if trafficStats.Enabled {
|
||||
item["traffic"] = map[string]any{
|
||||
"enabled": true,
|
||||
"limit": trafficStats.Limit,
|
||||
"used": trafficStats.Used,
|
||||
}
|
||||
item["trafficStats"] = trafficStats
|
||||
} else {
|
||||
item["traffic"] = map[string]any{
|
||||
item["trafficStats"] = map[string]any{
|
||||
"enabled": false,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user