grafana/pkg/services/annotations
William Wernert 48b5ac779b
Alerting/Annotations: Add annotation backend for Loki alert state history (#78156)
* Move scope type vars to testutil package

* Expose parts of state historian for use in annotation backend

* Implement Loki ASH Annotation store

This store will only implement the `Get` method of a RepositoryImpl since alert state history
writes to Loki elsewhere.

* Use interface for Loki HTTP Client

* Add tests for Loki ASH Annotation store

* Add missing test

* Fix lint

* Organize tests

* Add filter tests

* Improve tests

* Move filter logic into outer function

* Fix lint

* Add comment

* Fix tests

* Fix lint

* Rename historian store + refactor

* Cleanup historian store

* Fix tests

* Minor cleanup

* Use new `ShouldRecordAnnotation` filter

* Fix logic and add tests for this check

* Fix typos, remove unused variables, `< 1` -> `== 0`

* More closely mimic RBAC filter from xorm to ensure correct logic

* Move off weaveworks client

* Address PR comments
2024-01-10 18:42:35 -05:00
..
accesscontrol RBAC: Change annotation filter to use dashboard based annotation scopes (#78635) 2023-11-29 05:34:44 -05:00
annotationsimpl Alerting/Annotations: Add annotation backend for Loki alert state history (#78156) 2024-01-10 18:42:35 -05:00
annotationstest Rename Id to ID for annotation models (#62886) 2023-02-03 17:23:09 +01:00
testutil Annotations: Lift parts of RBAC from xorm store into auth service (#76967) 2023-11-14 18:11:01 -05:00
annotations_repository_mock.go Alerting: Persist annotations from multidimensional rules in batches (#56575) 2022-11-04 10:39:26 -05:00
annotations.go Chore: Add errutils helpers (#73577) 2023-08-22 12:52:24 +02:00
models.go Annotations/Alerting: Add Loki historian store stub (#78363) 2023-12-12 17:43:09 -05:00