grafana/pkg/services/ngalert/store
Sofia Papagiannaki d1dab5828d
Alerting: Update rule API to address folders by UID (#74600)
* Change ruler API to expect the folder UID as namespace

* Update example requests

* Fix tests

* Update swagger

* Modify FIle field in /api/prometheus/grafana/api/v1/rules

* Fix ruler export

* Modify folder in responses to be formatted as <parent UID>/<title>

* Add alerting test with nested folders

* Apply suggestion from code review

* Alerting: use folder UID instead of title in rule API (#77166)

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>

* Drop a few more latent uses of namespace_id

* move getNamespaceKey to models package

* switch GetAlertRulesForScheduling to use folder table

* update GetAlertRulesForScheduling to return folder titles in format `parent_uid/title`.

* fi tests

* add tests for GetAlertRulesForScheduling when parent uid

* fix integration tests after merge

* fix test after merge

* change format of the namespace to JSON array

this is needed for forward compatibility, when we migrate to full paths

* update EF code to decode nested folder

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Alex Weaver <weaver.alex.d@gmail.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-01-17 11:07:39 +02:00
..
admin_configuration_store_mock.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
admin_configuration.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
alert_rule_test.go Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00
alert_rule.go Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00
alertmanager_test.go Chore: Simplify function signature for GetLatestAlertmanagerConfiguration (#79392) 2023-12-12 13:49:54 +01:00
alertmanager.go Chore: Simplify function signature for GetLatestAlertmanagerConfiguration (#79392) 2023-12-12 13:49:54 +01:00
database.go Chore: Simplify function signature for GetLatestAlertmanagerConfiguration (#79392) 2023-12-12 13:49:54 +01:00
deltas_test.go Remove folderid service test (#80433) 2024-01-12 16:43:39 +01:00
deltas.go Chore: Remove result fields from ngalert (#65410) 2023-03-28 10:34:35 +02:00
image_test.go Alerting: Use URLs in image annotations (#66804) 2023-04-26 13:06:18 -03:00
image.go Alerting: Bump grafana/alerting and refactor the ImageStore/Provider to provide image URL/bytes (#70182) 2023-06-21 20:53:30 -03:00
instance_database_test.go Alerting: Remove and revert flag alertingBigTransactions (#65976) 2023-04-06 18:06:25 +02:00
instance_database.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
org.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
provisioning_store_test.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
provisioning_store.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
range_to_instant_test.go Alerting: Apply query optimization to eval endpoints (#78566) 2023-11-28 19:44:28 -05:00
range_to_instant.go Alerting: Apply query optimization to eval endpoints (#78566) 2023-11-28 19:44:28 -05:00
testing.go Alerting: Bump grafana/alerting and refactor the ImageStore/Provider to provide image URL/bytes (#70182) 2023-06-21 20:53:30 -03:00
transactions.go Alerting: Provisioning API - Notification Policies (#46755) 2022-04-05 16:48:51 -05:00