mirror of
https://github.com/smartyellow/status.git
synced 2025-02-19 20:19:28 +00:00
Updated e-mail text
This commit is contained in:
parent
354e735f10
commit
aac2de904d
4
index.js
4
index.js
@ -472,7 +472,7 @@ module.exports = {
|
|||||||
|
|
||||||
if (tilesToNotifyAbout.size > 0) {
|
if (tilesToNotifyAbout.size > 0) {
|
||||||
server.debug('Sending status e-mails for the following services: ', [ ...tilesToNotifyAbout ].map(t => t.serviceId).join(', '));
|
server.debug('Sending status e-mails for the following services: ', [ ...tilesToNotifyAbout ].map(t => t.serviceId).join(', '));
|
||||||
const message = '<p>The following tiles are updated to have priority 1 or higher:</p><ul>'
|
const message = '<p>The following web services are updated to have priority 1 or higher:</p><ul>'
|
||||||
+ [ ...tilesToNotifyAbout ].map(tile => {
|
+ [ ...tilesToNotifyAbout ].map(tile => {
|
||||||
let text = `<li><p>${tile.service.name?.en || tile.serviceId}: ${tile.statusText}`;
|
let text = `<li><p>${tile.service.name?.en || tile.serviceId}: ${tile.statusText}`;
|
||||||
if (tile.badges?.length > 0) {
|
if (tile.badges?.length > 0) {
|
||||||
@ -484,7 +484,7 @@ module.exports = {
|
|||||||
+ '</ul>';
|
+ '</ul>';
|
||||||
|
|
||||||
settings.emailRecipients.forEach(address => server.sendEmail({
|
settings.emailRecipients.forEach(address => server.sendEmail({
|
||||||
subject: `[alert] ${tilesToNotifyAbout.size} new tile${tilesToNotifyAbout.size === 1 ? '' : 's'}!`,
|
subject: `[alert] ${tilesToNotifyAbout.size} web service${tilesToNotifyAbout.size === 1 ? '' : 's'} have a high priority!`,
|
||||||
sender: settings.emailSender,
|
sender: settings.emailSender,
|
||||||
to: address,
|
to: address,
|
||||||
body: message,
|
body: message,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user