refactoring: alert rule query refactoring (#10941)

This commit is contained in:
Torkel Ödegaard
2018-02-16 13:56:04 +01:00
committed by GitHub
parent 5e33a52b69
commit 5323971c21
8 changed files with 77 additions and 115 deletions
+17 -1
View File
@@ -166,8 +166,9 @@ type GetAlertsQuery struct {
DashboardId int64
PanelId int64
Limit int64
User *SignedInUser
Result []*Alert
Result []*AlertListItemDTO
}
type GetAllAlertsQuery struct {
@@ -187,6 +188,21 @@ type GetAlertStatesForDashboardQuery struct {
Result []*AlertStateInfoDTO
}
type AlertListItemDTO struct {
Id int64 `json:"id"`
DashboardId int64 `json:"dashboardId"`
DashboardUid string `json:"dashboardUid"`
DashboardSlug string `json:"dashboardSlug"`
PanelId int64 `json:"panelId"`
Name string `json:"name"`
State AlertStateType `json:"state"`
NewStateDate time.Time `json:"newStateDate"`
EvalDate time.Time `json:"evalDate"`
EvalData *simplejson.Json `json:"evalData"`
ExecutionError string `json:"executionError"`
Url string `json:"url"`
}
type AlertStateInfoDTO struct {
Id int64 `json:"id"`
DashboardId int64 `json:"dashboardId"`