Don´t show users if meshviewer is disabled
This commit is contained in:
parent
7630e90b90
commit
82bfc049a7
8
main.go
8
main.go
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user