grafana/pkg/services/ngalert/api
Alex Moreno 53945afedf
Alerting: Allow alert rule pausing from API (#62326)
* Add is_paused attr to the POST alert rule group endpoint

* Add is_paused to alerting API POST alert rule group

* Fixed tests

* Add is_paused to alerting gettable endpoints

* Fix integration tests

* Alerting: allow to pause existing rules (#62401)

* Display Pause Rule switch in Editing Rule form

* add isPaused property to form interface and dto

* map isPaused prop with is_paused value from DTO

Also update test snapshots

* Append '(Paused)' text on alert list state column when appropriate

* Change Switch styles according to discussion with UX

Also adding a tooltip with info what this means

* Adjust styles

* Fix alignment and isPaused type definition

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>

* Fix test

* Fix test

* Fix RuleList test

---------

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>

* wip

* Fix tests and add comments to clarify AlertRuleWithOptionals

* Fix one more test

* Fix tests

* Fix typo in comment

* Fix alert rule(s) cannot be paused via API

* Add integration tests for alerting api pausing flow

* Remove duplicated integration test

---------

Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
2023-02-01 13:15:03 +01:00
..
test-data Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
tooling Alerting: Allow alert rule pausing from API (#62326) 2023-02-01 13:15:03 +01:00
api_alertmanager_guards_test.go Alerting: replace usage of simplejson to json.RawMessage in NotificationChannelConfig (#60423) 2022-12-16 13:01:06 -05:00
api_alertmanager_guards.go Alerting: replace usage of simplejson to json.RawMessage in NotificationChannelConfig (#60423) 2022-12-16 13:01:06 -05:00
api_alertmanager_test.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
api_alertmanager.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
api_configuration_test.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
api_configuration.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
api_prometheus_test_fixtures.go Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
api_prometheus_test.go Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
api_prometheus.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
api_provisioning_test.go Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
api_provisioning.go Alerting: Create endpoints for exporting in provisioning file format (#58623) 2023-01-27 11:39:16 -05:00
api_ruler_test.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
api_ruler_validation_test.go Alerting: Allow alert rule pausing from API (#62326) 2023-02-01 13:15:03 +01:00
api_ruler_validation.go Alerting: Allow alert rule pausing from API (#62326) 2023-02-01 13:15:03 +01:00
api_ruler.go Alerting: Allow alert rule pausing from API (#62326) 2023-02-01 13:15:03 +01:00
api_testing_test.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
api_testing.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
api.go AuthN: User Quota (#61540) 2023-01-16 11:54:15 +01:00
authorization_test.go Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
authorization.go Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
configuration.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
errors.go Alerting: Update forking request handlers to use the same errors (#52965) 2022-08-02 09:33:59 -04:00
forking_alertmanager.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
forking_prometheus.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
forking_ruler.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
generated_base_api_alertmanager.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
generated_base_api_configuration.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
generated_base_api_prometheus.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
generated_base_api_provisioning.go Alerting: Create endpoints for exporting in provisioning file format (#58623) 2023-01-27 11:39:16 -05:00
generated_base_api_ruler.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
generated_base_api_testing.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
lotex_am.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
lotex_prom.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
lotex_ruler_test.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
lotex_ruler.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
persist.go Alerting: Add alert pausing feature (#60734) 2023-01-26 18:29:10 +01:00
promql_compat_test.go Alerting/testing promql extraction (#34665) 2021-05-25 11:54:50 -04:00
promql_compat.go Update dskit to the latest main (#62616) 2023-01-31 19:05:49 +00:00
provisioning.go Alerting: Create endpoints for exporting in provisioning file format (#58623) 2023-01-27 11:39:16 -05:00
testing_api.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
testing.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
util_test.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
util.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00