adjust email template for alerts

This commit is contained in:
miloschwartz
2026-04-21 18:19:27 -07:00
parent b3aafa5fe6
commit 6f07156075
7 changed files with 69 additions and 34 deletions
@@ -41,7 +41,6 @@ export async function fireHealthCheckHealthyAlert(
orgId,
healthCheckId,
data: {
healthCheckId,
...(healthCheckName != null ? { healthCheckName } : {}),
...extra
}
@@ -87,7 +86,6 @@ export async function fireHealthCheckNotHealthyAlert(
orgId,
healthCheckId,
data: {
healthCheckId,
...(healthCheckName != null ? { healthCheckName } : {}),
...extra
}
@@ -41,7 +41,6 @@ export async function fireResourceHealthyAlert(
orgId,
resourceId,
data: {
resourceId,
...(resourceName != null ? { resourceName } : {}),
...extra
}
@@ -87,7 +86,6 @@ export async function fireResourceUnhealthyAlert(
orgId,
resourceId,
data: {
resourceId,
...(resourceName != null ? { resourceName } : {}),
...extra
}
@@ -133,7 +131,6 @@ export async function fireResourceToggleAlert(
orgId,
resourceId,
data: {
resourceId,
...(resourceName != null ? { resourceName } : {}),
...extra
}
@@ -41,7 +41,6 @@ export async function fireSiteOnlineAlert(
orgId,
siteId,
data: {
siteId,
...(siteName != null ? { siteName } : {}),
...extra
}
@@ -87,7 +86,6 @@ export async function fireSiteOfflineAlert(
orgId,
siteId,
data: {
siteId,
...(siteName != null ? { siteName } : {}),
...extra
}
+5 -1
View File
@@ -36,13 +36,17 @@ export async function sendAlertEmail(
const from = config.getNoReplyEmail();
const subject = buildSubject(context);
const baseUrl = config.getRawConfig().app.dashboard_url!.replace(/\/$/, "");
const dashboardLink = `${baseUrl}/${context.orgId}/settings`;
for (const to of recipients) {
try {
await sendEmail(
AlertNotification({
eventType: context.eventType,
orgId: context.orgId,
data: context.data
data: context.data,
dashboardLink
}),
{
from,