feat(alerting): cleanup, removed alert changes table and code

This commit is contained in:
Torkel Ödegaard
2016-07-13 11:58:55 +02:00
parent d9096110f8
commit 624cd6fc0a
7 changed files with 5 additions and 246 deletions
-21
View File
@@ -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
View File
@@ -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