diff --git a/Gopkg.lock b/Gopkg.lock index 8da56ceb..2f0ddecd 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,12 +2,12 @@ [[projects]] - digest = "1:e52e3ff16e2e82410ca561073537e336b0aff9f3bded65ee856aec7ec47efbaf" + digest = "1:b766501db7f06de27d80503fc6e956a7ce216b32bc7d833a20186edc88d52394" name = "github.com/golift/unifi" packages = ["."] pruneopts = "UT" - revision = "3968f3384cbe437d991c27c4338e4c371897ac32" - version = "v2.0.2" + revision = "9a7a31e810005b7cfd7337ec9fe45f19531c3953" + version = "v2.0.3" [[projects]] branch = "master" diff --git a/cmd/unifi-poller/main.go b/cmd/unifi-poller/main.go index 6ebf9acf..ca26976d 100644 --- a/cmd/unifi-poller/main.go +++ b/cmd/unifi-poller/main.go @@ -96,12 +96,15 @@ func (c *Config) CheckSites(controller *unifi.Unifi) error { for _, site := range sites { msg = append(msg, site.Name+" ("+site.Desc+")") } - log.Printf("Found %d site(s) on controller: %v", len(msg), strings.Join(msg, ",")) + log.Printf("Found %d site(s) on controller: %v", len(msg), strings.Join(msg, ", ")) + } + if StringInSlice("all", c.Sites) { + return nil } FIRST: for _, s := range c.Sites { for _, site := range sites { - if s == site.Name || s == "all" { + if s == site.Name { continue FIRST } } diff --git a/examples/README.md b/examples/README.md index 39886d79..90fa3dd3 100644 --- a/examples/README.md +++ b/examples/README.md @@ -5,7 +5,7 @@ Import these into Grafana to quickly visualize data from your devices. Created with Grafana 6.2. These dashboards require a few plugins. -See the [Wiki](https://github.com/davidnewhall/unifi-poller/wiki/Grafana) for more info. +See the [Grafana Wiki Article](https://github.com/davidnewhall/unifi-poller/wiki/Grafana) for more info. Keep in mind these dashboards are just examples. You should make an Example folder in Grafana to keep them in, and copy them to new dashboards that you want to change.