The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/models/alert_state.go

47 lines
1.2 KiB

package models
// type AlertState struct {
// Id int64 `json:"-"`
// OrgId int64 `json:"-"`
// AlertId int64 `json:"alertId"`
// State string `json:"state"`
// Created time.Time `json:"created"`
// Info string `json:"info"`
// TriggeredAlerts *simplejson.Json `json:"triggeredAlerts"`
// }
//
// func (this *UpdateAlertStateCommand) IsValidState() bool {
// for _, v := range alertstates.ValidStates {
// if this.State == v {
// return true
// }
// }
// return false
// }
//
// // Commands
//
// type UpdateAlertStateCommand struct {
// AlertId int64 `json:"alertId" binding:"Required"`
// OrgId int64 `json:"orgId" binding:"Required"`
// State string `json:"state" binding:"Required"`
// Info string `json:"info"`
//
// Result *Alert
// }
//
// // Queries
//
// type GetAlertsStateQuery struct {
// OrgId int64 `json:"orgId" binding:"Required"`
// AlertId int64 `json:"alertId" binding:"Required"`
//
// Result *[]AlertState
// }
//
// type GetLastAlertStateQuery struct {
// AlertId int64
// OrgId int64
//
// Result *AlertState
// }