Alerting: Add values to annotations (#57738)

* Add values to annotations

* Fix imports

* Use State attrs instead of Result attrs

* Remove unnecessary variable
This commit is contained in:
Alex Moreno
2022-11-03 10:35:34 +01:00
committed by GitHub
parent b8303fd431
commit ba15d675e7
5 changed files with 55 additions and 11 deletions

View File

@@ -5,7 +5,6 @@ import (
"sync"
"time"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana/pkg/services/ngalert/models"
)
@@ -50,5 +49,5 @@ func (f *FakeRuleReader) ListAlertRules(_ context.Context, q *models.ListAlertRu
type FakeHistorian struct{}
func (f *FakeHistorian) RecordState(ctx context.Context, rule *models.AlertRule, labels data.Labels, evaluatedAt time.Time, currentData, previousData InstanceStateAndReason) {
func (f *FakeHistorian) RecordState(ctx context.Context, rule *models.AlertRule, currentState *State, evaluatedAt time.Time, currentData, previousData InstanceStateAndReason) {
}