grafana/public/app/plugins/datasource/alertmanager
Virginia Cepeda f27326f7d9
Alerting: Choose a previous valid AM configuration in case of error (#65746)
* Add new property to AlertmanagerConfig type

* Implement fetching successfully applied configurations

Added method to fetch them from the API and its corresponding action and reducer

* Extract ConfigEditor as component to avoid code duplication

* Display dropdown with valid configs upon error and allow to save them

* Fix tests

* Refactor to call new endpoint using RTK

* Improve texts

* Apply suggested refactor

* Change constant casing

* Only show config selector for Grafana AM

* Remove ts-ignore

* Move code together for simplicity

* Remove invalid mock

* Update endpoint and types based on backend changes

* Rename property

* Rename alermanager config property from backend changes

* Disable editing old configurations

Due to the latest backend changes, we no longer will provide the option to edit previous AM configurations in a textearea.
Instead users will only be allowed to reset to a specific one with the same content. For this reason the textearea for old conf
igurations is disabled and a different form action (not submit) is executed on the "reset config" button. The updateAlertManage
rConfigAction is reset to its old functionality due to these changes.

* Add id to AlertManagerCortexConfig type

We'll need it to pass as a parameter to the new reset endpoint

* Add new endpoint for resetting AM configs to an old version

* Move the "Reset to selected configuration" button next to the drop-down

* Add relative offset to configurations
2023-04-05 15:13:33 -03:00
..
img Alerting: unified alerting frontend (#32708) 2021-04-07 08:42:43 +03:00
ConfigEditor.tsx IconName: Move to grafana/data and use type on NavModelItem (#55013) 2022-09-12 20:09:33 +02:00
consts.ts Alerting: receivers table in the receivers page (#33119) 2021-04-23 15:54:31 +03:00
DataSource.ts Alerting: Improve Mimir AM interoperability with Grafana (#53396) 2022-08-16 16:01:57 +02:00
module.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
plugin.json Alerting: Make alertmanager datasource stable (#49485) 2022-05-24 14:44:41 +02:00
types.ts Alerting: Choose a previous valid AM configuration in case of error (#65746) 2023-04-05 15:13:33 -03:00