Don´t show users if meshviewer is disabled

This commit is contained in:
Stefan Hoffmann 2021-02-14 19:22:38 +01:00
parent 7630e90b90
commit 82bfc049a7

View File

@ -109,15 +109,19 @@ func processUcAPIs() ([]node, []link) {
log.Fatalln(err)
}
var model = lookupModels(currentDevice.Model)
var clients = currentDevice.Users
if conf.Meshviewer.Enabled == false {
clients = 0
}
nodes = append(nodes, node{
Firstseen: "0",
Lastseen: time.Unix(int64(currentDevice.LastSeen), 0).Format(iso8601),
IsOnline: itob(currentDevice.State),
IsGateway: false,
Clients: currentDevice.Users,
Clients: clients,
ClientsWifi24: 0,
ClientsWifi5: 0,
ClientsOther: currentDevice.Users,
ClientsOther: clients,
RootFSUsage: 0,
LoadAVG: load / 100,
MemoryUsage: mem / 100,