diff --git a/pkg/api/api.go b/pkg/api/api.go
index b519cd92303..f6e321b1b21 100644
--- a/pkg/api/api.go
+++ b/pkg/api/api.go
@@ -239,8 +239,8 @@ func Register(r *macaron.Macaron) {
r.Get("/metrics/test", GetTestMetrics)
r.Group("/alerts", func() {
- r.Get("/state/:alertId", wrap(GetAlertState))
- r.Put("/state/:alertId", bind(m.UpdateAlertStateCommand{}), wrap(PutAlertState))
+ r.Get("/events/:alertId", wrap(GetAlertState))
+ r.Put("/events/:alertId", bind(m.UpdateAlertStateCommand{}), wrap(PutAlertState))
r.Get("/changes", wrap(GetAlertChanges))
r.Get("/", wrap(GetAlerts))
r.Get("/:id", ValidateOrgAlert, wrap(GetAlert))
diff --git a/pkg/services/sqlstore/alert_state.go b/pkg/services/sqlstore/alert_state.go
index 54a67c4aa71..86544d04fd5 100644
--- a/pkg/services/sqlstore/alert_state.go
+++ b/pkg/services/sqlstore/alert_state.go
@@ -50,7 +50,7 @@ func SetNewAlertState(cmd *m.UpdateAlertStateCommand) error {
func GetAlertStateLogByAlertId(cmd *m.GetAlertsStateLogCommand) error {
alertLogs := make([]m.AlertStateLog, 0)
- if err := x.Where("alert_id = ?", cmd.AlertId).Find(&alertLogs); err != nil {
+ if err := x.Where("alert_id = ?", cmd.AlertId).Desc("created").Find(&alertLogs); err != nil {
return err
}
diff --git a/public/app/core/routes/routes.ts b/public/app/core/routes/routes.ts
index 899310c9c2b..a5c66860ebe 100644
--- a/public/app/core/routes/routes.ts
+++ b/public/app/core/routes/routes.ts
@@ -204,6 +204,12 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
controllerAs: 'ctrl',
resolve: loadAlertsBundle,
})
+ .when('/alerts/events/:alertId', {
+ templateUrl: 'public/app/features/alerts/partials/alert_log.html',
+ controller: 'AlertLogCtrl',
+ controllerAs: 'ctrl',
+ resolve: loadAlertsBundle,
+ })
.otherwise({
templateUrl: 'public/app/partials/error.html',
controller: 'ErrorCtrl'
diff --git a/public/app/features/alerts/alert_log_ctrl.ts b/public/app/features/alerts/alert_log_ctrl.ts
new file mode 100644
index 00000000000..191f6337e99
--- /dev/null
+++ b/public/app/features/alerts/alert_log_ctrl.ts
@@ -0,0 +1,33 @@
+///
+ | Time | +Description | + +
---|---|---|
+ {{alertLog.newState}} + | ++ {{alertLog.created}} + | ++ {{alertLog.info}} + | +