parent
62bb21102f
commit
8fffdac0a4
@ -106,15 +106,14 @@ func NewNode(nodes *runtime.Nodes, n *runtime.Node) *Node {
|
|||||||
}
|
}
|
||||||
if statistic := n.Statistics; statistic != nil {
|
if statistic := n.Statistics; statistic != nil {
|
||||||
node.Clients = statistic.Clients.Total
|
node.Clients = statistic.Clients.Total
|
||||||
if node.Clients == 0 {
|
|
||||||
node.Clients = statistic.Clients.Wifi24 + statistic.Clients.Wifi5
|
|
||||||
}
|
|
||||||
node.ClientsWifi24 = statistic.Clients.Wifi24
|
node.ClientsWifi24 = statistic.Clients.Wifi24
|
||||||
node.ClientsWifi5 = statistic.Clients.Wifi5
|
node.ClientsWifi5 = statistic.Clients.Wifi5
|
||||||
|
|
||||||
wifi := node.ClientsWifi24 - node.ClientsWifi5
|
clientsWifi := node.ClientsWifi24 + node.ClientsWifi5
|
||||||
if node.Clients >= wifi {
|
if node.Clients == 0 {
|
||||||
node.ClientsOthers = node.Clients - wifi
|
node.Clients = clientsWifi
|
||||||
|
} else if node.Clients >= clientsWifi {
|
||||||
|
node.ClientsOthers = node.Clients - clientsWifi
|
||||||
}
|
}
|
||||||
|
|
||||||
node.RootFSUsage = statistic.RootFsUsage
|
node.RootFSUsage = statistic.RootFsUsage
|
||||||
|
Loading…
Reference in New Issue
Block a user