diff --git a/admin/server/alerts.go b/admin/server/alerts.go index eb4c10809c6..a93ffa42321 100644 --- a/admin/server/alerts.go +++ b/admin/server/alerts.go @@ -464,7 +464,7 @@ func (s *Server) yamlForManagedAlert(opts *adminv1.AlertOptions, ownerUserID str // Notification options res.Renotify = opts.Renotify res.RenotifyAfter = opts.RenotifyAfterSeconds - res.Notify.Email.Emails = opts.EmailRecipients + res.Notify.Email.Recipients = opts.EmailRecipients res.Notify.Slack.Channels = opts.SlackChannels res.Notify.Slack.Users = opts.SlackUsers res.Notify.Slack.Webhooks = opts.SlackWebhooks @@ -496,7 +496,7 @@ func (s *Server) yamlForCommittedAlert(opts *adminv1.AlertOptions) ([]byte, erro // Notification options res.Renotify = opts.Renotify res.RenotifyAfter = opts.RenotifyAfterSeconds - res.Notify.Email.Emails = opts.EmailRecipients + res.Notify.Email.Recipients = opts.EmailRecipients res.Notify.Slack.Channels = opts.SlackChannels res.Notify.Slack.Users = opts.SlackUsers res.Notify.Slack.Webhooks = opts.SlackWebhooks @@ -589,7 +589,7 @@ type alertYAML struct { RenotifyAfter uint32 `yaml:"renotify_after"` Notify struct { Email struct { - Emails []string `yaml:"emails"` + Recipients []string `yaml:"emails"` } Slack struct { Users []string `yaml:"users"` diff --git a/web-admin/src/features/alerts/metadata/AlertMetadata.svelte b/web-admin/src/features/alerts/metadata/AlertMetadata.svelte index 90f67f06f00..a99f05c096f 100644 --- a/web-admin/src/features/alerts/metadata/AlertMetadata.svelte +++ b/web-admin/src/features/alerts/metadata/AlertMetadata.svelte @@ -163,7 +163,7 @@ n.connector === "email", - )?.properties?.email?.recipients ?? []} + )?.properties?.recipients ?? []} /> {/if} diff --git a/web-admin/src/features/scheduled-reports/metadata/ReportMetadata.svelte b/web-admin/src/features/scheduled-reports/metadata/ReportMetadata.svelte index 717506daa0b..1a04cb9c0d0 100644 --- a/web-admin/src/features/scheduled-reports/metadata/ReportMetadata.svelte +++ b/web-admin/src/features/scheduled-reports/metadata/ReportMetadata.svelte @@ -164,7 +164,7 @@ n.connector === "email", - )?.properties?.email?.recipients ?? []} + )?.properties?.recipients ?? []} /> {/if} diff --git a/web-common/src/features/alerts/EditAlertDialog.svelte b/web-common/src/features/alerts/EditAlertDialog.svelte index c2010f40d99..7e95a468a0e 100644 --- a/web-common/src/features/alerts/EditAlertDialog.svelte +++ b/web-common/src/features/alerts/EditAlertDialog.svelte @@ -55,7 +55,7 @@ recipients: alertSpec?.notifiers ?.find((n) => n.connector === "email") - ?.properties?.email?.recipients?.map((r) => ({ email: r })) ?? [], + ?.properties?.recipients?.map((r) => ({ email: r })) ?? [], evaluationInterval: alertSpec.intervalsIsoDuration ?? "", ...extractAlertFormValues( queryArgsJson, diff --git a/web-common/src/features/scheduled-reports/EditScheduledReportDialog.svelte b/web-common/src/features/scheduled-reports/EditScheduledReportDialog.svelte index e25aa5ecdcf..35c2028292f 100644 --- a/web-common/src/features/scheduled-reports/EditScheduledReportDialog.svelte +++ b/web-common/src/features/scheduled-reports/EditScheduledReportDialog.svelte @@ -58,7 +58,7 @@ recipients: reportSpec.notifiers ?.find((n) => n.connector === "email") - ?.properties?.email?.recipients?.map((email) => ({ + ?.properties?.recipients?.map((email) => ({ email: email, })) ?? [], },