Added config flag to display Users
This commit is contained in:
parent
ab5939eb9d
commit
f91081b93f
@ -7,6 +7,7 @@
|
|||||||
},
|
},
|
||||||
"unifi": {
|
"unifi": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
|
"displayusers": true,
|
||||||
"APIUrl": "https://unifi.freifunk-troisdorf.de:8443",
|
"APIUrl": "https://unifi.freifunk-troisdorf.de:8443",
|
||||||
"user": "APIuser",
|
"user": "APIuser",
|
||||||
"password": "PASSWORD",
|
"password": "PASSWORD",
|
||||||
|
2
main.go
2
main.go
@ -110,7 +110,7 @@ func processUcAPIs() ([]node, []link) {
|
|||||||
}
|
}
|
||||||
var model = lookupModels(currentDevice.Model)
|
var model = lookupModels(currentDevice.Model)
|
||||||
var clients = currentDevice.Users
|
var clients = currentDevice.Users
|
||||||
if conf.Meshviewer.Enabled == false {
|
if conf.Unifi.DisplayUsers == false {
|
||||||
clients = 0
|
clients = 0
|
||||||
}
|
}
|
||||||
nodes = append(nodes, node{
|
nodes = append(nodes, node{
|
||||||
|
1
types.go
1
types.go
@ -19,6 +19,7 @@ type config struct {
|
|||||||
} `json:"unms"`
|
} `json:"unms"`
|
||||||
Unifi struct {
|
Unifi struct {
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
DisplayUsers bool `json:"enabled"`
|
||||||
APIURL string `json:"APIUrl"`
|
APIURL string `json:"APIUrl"`
|
||||||
User string `json:"user"`
|
User string `json:"user"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
|
Loading…
Reference in New Issue
Block a user