Alerting: Always allow configuring AM configuration (#57522)

This commit is contained in:
Gilles De Mey 2022-10-25 16:52:11 +02:00 committed by GitHub
parent 7414ba7279
commit 8788f7d2d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,8 +130,6 @@ export const ExternalAlertmanagers = () => {
}; };
const noAlertmanagers = externalAlertManagers?.length === 0; const noAlertmanagers = externalAlertManagers?.length === 0;
const noDsAlertmanagers = externalDsAlertManagers?.length === 0;
const hasExternalAlertmanagers = !(noAlertmanagers && noDsAlertmanagers);
return ( return (
<div> <div>
@ -149,20 +147,18 @@ export const ExternalAlertmanagers = () => {
inactive={alertmanagersChoice === AlertmanagerChoice.Internal} inactive={alertmanagersChoice === AlertmanagerChoice.Internal}
/> />
{hasExternalAlertmanagers && ( <div className={styles.amChoice}>
<div className={styles.amChoice}> <Field
<Field label="Send alerts to"
label="Send alerts to" description="Configures how the Grafana alert rule evaluation engine Alertmanager handles your alerts. Internal (Grafana built-in Alertmanager), External (All Alertmanagers configured above), or both."
description="Configures how the Grafana alert rule evaluation engine Alertmanager handles your alerts. Internal (Grafana built-in Alertmanager), External (All Alertmanagers configured above), or both." >
> <RadioButtonGroup
<RadioButtonGroup options={alertmanagerChoices}
options={alertmanagerChoices} value={alertmanagersChoice}
value={alertmanagersChoice} onChange={(value) => onChangeAlertmanagerChoice(value!)}
onChange={(value) => onChangeAlertmanagerChoice(value!)} />
/> </Field>
</Field> </div>
</div>
)}
<h5>Alertmanagers by URL</h5> <h5>Alertmanagers by URL</h5>
<Alert severity="warning" title="Deprecation Notice"> <Alert severity="warning" title="Deprecation Notice">