Alerting: Fix rule state history with annotations backend (#101174)
* add alertUID to annotations API query parameter * update state history UI to fetch rule by UID --------- Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
@@ -41,6 +41,7 @@ func (hs *HTTPServer) GetAnnotations(c *contextmodel.ReqContext) response.Respon
|
||||
OrgID: c.SignedInUser.GetOrgID(),
|
||||
UserID: c.QueryInt64("userId"),
|
||||
AlertID: c.QueryInt64("alertId"),
|
||||
AlertUID: c.Query("alertUID"),
|
||||
DashboardID: c.QueryInt64("dashboardId"),
|
||||
DashboardUID: c.Query("dashboardUID"),
|
||||
PanelID: c.QueryInt64("panelId"),
|
||||
@@ -744,10 +745,15 @@ type GetAnnotationsParams struct {
|
||||
// in:query
|
||||
// required:false
|
||||
UserID int64 `json:"userId"`
|
||||
// Find annotations for a specified alert.
|
||||
// Find annotations for a specified alert rule by its ID.
|
||||
// deprecated: AlertID is deprecated and will be removed in future versions. Please use AlertUID instead.
|
||||
// in:query
|
||||
// required:false
|
||||
AlertID int64 `json:"alertId"`
|
||||
// Find annotations for a specified alert rule by its UID.
|
||||
// in:query
|
||||
// required:false
|
||||
AlertUID string `json:"alertUID"`
|
||||
// Find annotations that are scoped to a specific dashboard
|
||||
// in:query
|
||||
// required:false
|
||||
|
||||
Reference in New Issue
Block a user