Alerting: added possibility to preview grafana managed alert rules. (#34600)

* starting to add eval logic.

* wip

* first version of test rule.

* reverted file.

* add info colum to result to show error or (with CC evalmatches)

* fix labels in evalmatch

* fix be test

* refactored using observables.

* moved widht/height div to outside panel rendere.

* adding docs api level.

* adding container styles to error div.

* increasing size of preview.

Co-authored-by: kyle <kyle@grafana.com>
This commit is contained in:
Marcus Andersson
2021-05-26 10:06:28 +02:00
committed by GitHub
co-authored by kyle
parent 42f33630c7
commit e19b3df1a9
13 changed files with 362 additions and 12 deletions
+5
View File
@@ -24,6 +24,11 @@ func (cr classicReducer) ValidReduceFunc() bool {
//nolint: gocyclo
func (cr classicReducer) Reduce(series mathexp.Series) mathexp.Number {
num := mathexp.NewNumber("", nil)
if series.GetLabels() != nil {
num.SetLabels(series.GetLabels().Copy())
}
num.SetValue(nil)
if series.Len() == 0 {