Skip to content

Commit

Permalink
fix normalizing radio band identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
dmke committed May 18, 2022
1 parent 9d7ff34 commit 2c8c8da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions exporter/api_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func (radio radioResponse) Normalize() (r Radio) {
}

switch radio.Band {
case "2.4GHz":
case "2.4GHz", "2.4 GHz":
r.Band = BandBGN
case "5GHz":
case "5GHz", "5 GHz":
r.Band = BandAC
}

Expand Down
5 changes: 4 additions & 1 deletion exporter/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ type PortalCollector struct {
ctx context.Context // HTTP request context
}

var _ prometheus.Collector = (*Collector)(nil)
var (
_ prometheus.Collector = (*Collector)(nil)
_ prometheus.Collector = (*PortalCollector)(nil)
)

const namespace = "cambium_maestro"

Expand Down

0 comments on commit 2c8c8da

Please sign in to comment.