Added config flag to display Users
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Stefan Hoffmann 2021-03-02 20:15:54 +01:00
parent ab5939eb9d
commit f91081b93f
3 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@
},
"unifi": {
"enabled": false,
"displayusers": true,
"APIUrl": "https://unifi.freifunk-troisdorf.de:8443",
"user": "APIuser",
"password": "PASSWORD",

View File

@ -110,7 +110,7 @@ func processUcAPIs() ([]node, []link) {
}
var model = lookupModels(currentDevice.Model)
var clients = currentDevice.Users
if conf.Meshviewer.Enabled == false {
if conf.Unifi.DisplayUsers == false {
clients = 0
}
nodes = append(nodes, node{

View File

@ -19,6 +19,7 @@ type config struct {
} `json:"unms"`
Unifi struct {
Enabled bool `json:"enabled"`
DisplayUsers bool `json:"enabled"`
APIURL string `json:"APIUrl"`
User string `json:"user"`
Password string `json:"password"`