From 82bfc049a7d0e7bf5599288a920372f62c61595c Mon Sep 17 00:00:00 2001 From: Stefan Hoffmann Date: Sun, 14 Feb 2021 19:22:38 +0100 Subject: [PATCH] =?UTF-8?q?Don=C2=B4t=20show=20users=20if=20meshviewer=20i?= =?UTF-8?q?s=20disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 9009871..6f10cab 100644 --- a/main.go +++ b/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,