feat(alerting): add basic UI for history in alert tab

ref #5850
This commit is contained in:
bergquist
2016-08-30 13:22:59 +02:00
parent 650a87dc05
commit 11a4ff0f8a
7 changed files with 80 additions and 4 deletions
+2
View File
@@ -4,6 +4,7 @@ import (
"time"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/metrics"
m "github.com/grafana/grafana/pkg/models"
@@ -65,6 +66,7 @@ func (handler *DefaultResultHandler) Handle(ctx *EvalContext) {
NewState: string(ctx.Rule.State),
PrevState: string(oldState),
Timestamp: time.Now(),
Data: simplejson.NewFromAny(ctx.EvalMatches),
}
annotationRepo := annotations.GetRepository()