Password Policy/App rename/PM Scheduling Improvements
This commit is contained in:
@@ -151,14 +151,14 @@ function digestHtml(alerts) {
|
||||
`<td style="padding:6px 10px">${a.title}</td><td style="padding:6px 10px">${a.message || ''}</td>` +
|
||||
`<td style="padding:6px 10px">${a.due_date || ''}</td></tr>`
|
||||
).join('');
|
||||
return `<h2>MixedAssets alerts</h2><p>${alerts.length} item(s) need attention.</p>` +
|
||||
return `<h2>DepreCore alerts</h2><p>${alerts.length} item(s) need attention.</p>` +
|
||||
`<table style="border-collapse:collapse;font-family:Arial,sans-serif;font-size:13px">` +
|
||||
`<thead><tr><th align="left" style="padding:6px 10px">Severity</th><th align="left" style="padding:6px 10px">Alert</th>` +
|
||||
`<th align="left" style="padding:6px 10px">Detail</th><th align="left" style="padding:6px 10px">Due</th></tr></thead><tbody>${rows}</tbody></table>`;
|
||||
}
|
||||
|
||||
function digestText(alerts) {
|
||||
return `MixedAssets alerts (${alerts.length}):\n` +
|
||||
return `DepreCore alerts (${alerts.length}):\n` +
|
||||
alerts.map((a) => `- [${a.severity}] ${a.title} — ${a.message || ''} ${a.due_date ? `(due ${a.due_date})` : ''}`).join('\n');
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ async function runAlertCycle(userId) {
|
||||
|
||||
if (emailReady) {
|
||||
await sendMail({
|
||||
subject: `MixedAssets: ${pending.length} new alert(s)`,
|
||||
subject: `DepreCore: ${pending.length} new alert(s)`,
|
||||
html: digestHtml(pending),
|
||||
text: digestText(pending)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user