Alerting: Remove url based external alertmanagers config (#57918)

* Remove URL-based alertmanagers from endpoint config

* WIP

* Add migration and alertmanagers from admin_configuration

* Empty comment removed

* set BasicAuth true when user is present in url

* Remove Alertmanagers from GET /admin_config payload

* Remove URL-based alertmanager configuration from UI

* Fix new uid generation in external alertmanagers migration

* Fix tests for URL-based external alertmanagers

* Fix API tests

* Add more tests, move migration code to separate file, and remove possible am duplicate urls

* Fix edge cases in migration

* Fix imports

* Remove useless fields and fix created_at/updated_at retrieval

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
This commit is contained in:
Alex Moreno
2022-11-10 16:34:13 +01:00
committed by GitHub
co-authored by George Robinson Konrad Lalik
parent 738e023d13
commit 45facbba11
21 changed files with 411 additions and 796 deletions
@@ -76,13 +76,11 @@ const (
// swagger:model
type PostableNGalertConfig struct {
Alertmanagers []string `json:"alertmanagers"`
AlertmanagersChoice AlertmanagersChoice `json:"alertmanagersChoice"`
}
// swagger:model
type GettableNGalertConfig struct {
Alertmanagers []string `json:"alertmanagers"`
AlertmanagersChoice AlertmanagersChoice `json:"alertmanagersChoice"`
}