From 2499efb9cfdf4da57e1c6cf88e6248fc6524645e Mon Sep 17 00:00:00 2001 From: Daniel Ding Date: Mon, 26 May 2025 16:40:04 +0800 Subject: [PATCH] fix: access statis dont list. --- pkg/config/network.go | 1 - pkg/schema/access.go | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/config/network.go b/pkg/config/network.go index 4171ab9..5b9a226 100755 --- a/pkg/config/network.go +++ b/pkg/config/network.go @@ -125,7 +125,6 @@ func (n *Network) LoadRoute() { } func (n *Network) LoadOutput() { - file := n.Dir("output") if err := libol.UnmarshalLoad(&n.Outputs, file); err != nil { libol.Error("Network.LoadOutput... %n", err) diff --git a/pkg/schema/access.go b/pkg/schema/access.go index 3e5ceb3..76be94f 100755 --- a/pkg/schema/access.go +++ b/pkg/schema/access.go @@ -1,7 +1,7 @@ package schema type Access struct { - Uptime int64 `json:"uptime"` + Uptime int64 `json:"upTime"` UUID string `json:"uuid"` Network string `json:"network"` User string `json:"user"` @@ -9,11 +9,11 @@ type Access struct { Protocol string `json:"protocol"` Remote string `json:"remote"` Device string `json:"device"` - RxBytes uint64 `json:"rxbytes"` - TxBytes uint64 `json:"txbytes"` + RxBytes uint64 `json:"rxBytes"` + TxBytes uint64 `json:"txBytes"` ErrPkt uint64 `json:"errors"` State string `json:"state"` - AliveTime int64 `json:"alivetime"` + AliveTime int64 `json:"aliveTime"` System string `json:"system"` Address string `json:"address"` Names map[string]string `json:"names"`