Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions admin/server/alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<EmailRecipients
emailRecipients={$alertQuery.data.resource.alert.spec.notifiers.find(
(n) => n.connector === "email",
)?.properties?.email?.recipients ?? []}
)?.properties?.recipients ?? []}
/>
</div>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<EmailRecipients
emailRecipients={$reportQuery.data.resource.report.spec.notifiers.find(
(n) => n.connector === "email",
)?.properties?.email?.recipients ?? []}
)?.properties?.recipients ?? []}
/>
</div>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/features/alerts/EditAlertDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
recipients:
reportSpec.notifiers
?.find((n) => n.connector === "email")
?.properties?.email?.recipients?.map((email) => ({
?.properties?.recipients?.map((email) => ({
email: email,
})) ?? [],
},
Expand Down