feat(alertlistpanel): support state filter

ref #5981
This commit is contained in:
bergquist
2016-09-14 10:49:05 +02:00
parent b49a642ca5
commit d0f9623037
10 changed files with 81 additions and 24 deletions
+2 -1
View File
@@ -25,13 +25,14 @@ func ValidateOrgAlert(c *middleware.Context) {
}
}
// GET /api/alerts/rules/
// GET /api/alerts
func GetAlerts(c *middleware.Context) Response {
query := models.GetAlertsQuery{
OrgId: c.OrgId,
State: c.QueryStrings("state"),
DashboardId: c.QueryInt64("dashboardId"),
PanelId: c.QueryInt64("panelId"),
Limit: c.QueryInt64("limit"),
}
if err := bus.Dispatch(&query); err != nil {
+1
View File
@@ -17,6 +17,7 @@ func GetAnnotations(c *middleware.Context) Response {
DashboardId: c.QueryInt64("dashboardId"),
PanelId: c.QueryInt64("panelId"),
Limit: c.QueryInt64("limit"),
NewState: c.QueryStrings("newState"),
}
repo := annotations.GetRepository()