Rename host -> hosts in stats/tactical_overview

master
René Jochum 4 years ago
parent ec8e10a17c
commit b920c88a6b

@ -9,6 +9,7 @@ require (
github.com/loopfz/gadgeto v0.10.1
github.com/sirupsen/logrus v1.7.0
github.com/spf13/cobra v1.0.0
github.com/stretchr/testify v1.4.0
github.com/toorop/gin-logrus v0.0.0-20200831135515-d2ee50d38dae
github.com/wI2L/fizz v0.13.4
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a

@ -12,7 +12,7 @@ func v1Routes(grp *fizz.RouterGroup) {
}, tonic.Handler(v1RawPost, 200))
grp.GET("/ping", []fizz.OperationOption{
fizz.Summary("GET Play ping-ping with the API"),
fizz.Summary("Play ping-ping with the API"),
fizz.Response("400", "Bad request", nil, nil),
}, tonic.Handler(v1Ping, 200))

@ -7,7 +7,7 @@ import (
)
type V1StatsTacticalOverview struct {
Host *V1StatsTacticalOverviewEntry `json:"host" validate:"required" description:"Host stats"`
Hosts *V1StatsTacticalOverviewEntry `json:"hosts" validate:"required" description:"Host stats"`
Services *V1StatsTacticalOverviewEntry `json:"services" validate:"required" description:"Service stats"`
Events *V1StatsTacticalOverviewEntry `json:"events" validate:"required" description:"Event stats"`
}
@ -116,5 +116,5 @@ StatsAnd: 3`
ev.Unhandled = rsp[0]["stats_3"].(float64)
ev.Stale = 0
return &V1StatsTacticalOverview{Host: host, Services: svc, Events: ev}, nil
return &V1StatsTacticalOverview{Hosts: host, Services: svc, Events: ev}, nil
}

Loading…
Cancel
Save