refactoring: alert rule query refactoring (#10941)
This commit is contained in:
+17
-1
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user