commit
dd604438ca
|
|
@ -17,6 +17,10 @@ func (u *USG) Points() ([]*influx.Point, error) {
|
||||||
// These points can be passed directly to influx.
|
// These points can be passed directly to influx.
|
||||||
// This is just like Points(), but specify when points were created.
|
// This is just like Points(), but specify when points were created.
|
||||||
func (u *USG) PointsAt(now time.Time) ([]*influx.Point, error) {
|
func (u *USG) PointsAt(now time.Time) ([]*influx.Point, error) {
|
||||||
|
if u.Stat.gw == nil {
|
||||||
|
// Disabled devices lack stats.
|
||||||
|
u.Stat.gw = &gw{}
|
||||||
|
}
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
"id": u.ID,
|
"id": u.ID,
|
||||||
"mac": u.Mac,
|
"mac": u.Mac,
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@ func (u *USW) Points() ([]*influx.Point, error) {
|
||||||
// These points can be passed directly to influx.
|
// These points can be passed directly to influx.
|
||||||
// This is just like Points(), but specify when points were created.
|
// This is just like Points(), but specify when points were created.
|
||||||
func (u *USW) PointsAt(now time.Time) ([]*influx.Point, error) {
|
func (u *USW) PointsAt(now time.Time) ([]*influx.Point, error) {
|
||||||
|
if u.Stat.sw == nil {
|
||||||
|
// Disabled devices lack stats.
|
||||||
|
u.Stat.sw = &sw{}
|
||||||
|
}
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
"id": u.ID,
|
"id": u.ID,
|
||||||
"mac": u.Mac,
|
"mac": u.Mac,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue