feat(alerting): cleanup, removed alert changes table and code
This commit is contained in:
@@ -22,27 +22,6 @@ func ValidateOrgAlert(c *middleware.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// GET /api/alerting/changes
|
||||
func GetAlertChanges(c *middleware.Context) Response {
|
||||
query := models.GetAlertChangesQuery{
|
||||
OrgId: c.OrgId,
|
||||
}
|
||||
|
||||
limit := c.QueryInt64("limit")
|
||||
if limit == 0 {
|
||||
limit = 50
|
||||
}
|
||||
|
||||
query.Limit = limit
|
||||
query.SinceId = c.QueryInt64("sinceId")
|
||||
|
||||
if err := bus.Dispatch(&query); err != nil {
|
||||
return ApiError(500, "List alerts failed", err)
|
||||
}
|
||||
|
||||
return Json(200, query.Result)
|
||||
}
|
||||
|
||||
// GET /api/alerts/rules/
|
||||
func GetAlerts(c *middleware.Context) Response {
|
||||
query := models.GetAlertsQuery{
|
||||
|
||||
+1
-3
@@ -245,7 +245,7 @@ func Register(r *macaron.Macaron) {
|
||||
// metrics
|
||||
r.Get("/metrics", wrap(GetInternalMetrics))
|
||||
|
||||
r.Group("/alerts", func() {
|
||||
r.Group("/alerting", func() {
|
||||
r.Group("/rules", func() {
|
||||
r.Get("/:alertId/states", wrap(GetAlertStates))
|
||||
//r.Put("/:alertId/state", bind(m.UpdateAlertStateCommand{}), wrap(PutAlertState))
|
||||
@@ -262,8 +262,6 @@ func Register(r *macaron.Macaron) {
|
||||
r.Get("/:notificationId", wrap(GetAlertNotificationById))
|
||||
r.Delete("/:notificationId", wrap(DeleteAlertNotification))
|
||||
}, reqOrgAdmin)
|
||||
|
||||
//r.Get("/changes", wrap(GetAlertChanges))
|
||||
})
|
||||
|
||||
// error test
|
||||
|
||||
Reference in New Issue
Block a user