Serialize AlertStatus as 'status'

AlertStatus doesn't have json tag with the field name, so it's serialized into 'Status', and it's the only uppercase field in the alert object. Tag it with 'status' name for consistency
This commit is contained in:
Łukasz Mierzwa 2017-04-28 11:34:01 -07:00
parent 5aeaf2cb98
commit 8bc5855c87
1 changed files with 3 additions and 3 deletions

View File

@ -81,9 +81,9 @@ type AlertBlock struct {
type APIAlert struct {
*model.Alert
Status types.AlertState
InhibitedBy []string `json:"inhibitedBy"`
SilencedBy []string `json:"silencedBy"`
Status types.AlertState `json:"status"`
InhibitedBy []string `json:"inhibitedBy"`
SilencedBy []string `json:"silencedBy"`
}
// AlertGroup is a list of alert blocks grouped by the same label set.