Prometheus: Promote Azure auth flag to configuration (#53447)

This commit is contained in:
Andres Martinez Gotor
2022-08-11 16:12:57 +02:00
committed by GitHub
parent 806fb8ab7a
commit a31d96d20a
16 changed files with 50 additions and 32 deletions

View File

@@ -18,7 +18,7 @@ export const ConfigEditor = (props: Props) => {
const alertmanagers = getAllAlertmanagerDataSources();
const azureAuthSettings = {
azureAuthSupported: !!config.featureToggles.prometheus_azure_auth,
azureAuthSupported: config.azureAuthEnabled,
getAzureAuthEnabled: (config: DataSourceSettings<any, any>): boolean => hasCredentials(config),
setAzureAuthEnabled: (config: DataSourceSettings<any, any>, enabled: boolean) =>
enabled ? setDefaultCredentials(config) : resetCredentials(config),