Qualify the name in the email subject

This commit is contained in:
Girish Ramakrishnan
2019-03-06 16:08:12 -08:00
parent 0c350dcf6e
commit 03d3ae3eb4

View File

@@ -189,15 +189,15 @@ function oomEvent(eventId, app, addon, containerId, event, callback) {
let title, message, program;
if (app) {
program = app.fqdn;
program = `App ${app.fqdn}`;
title = `The application ${app.fqdn} (${app.manifest.title}) ran out of memory.`;
message = 'The application has been restarted automatically. If you see this notification often, consider increasing the [memory limit](https://cloudron.io/documentation/apps/#increasing-the-memory-limit-of-an-app)';
} else if (addon) {
program = addon.name;
program = `${addon.name} service`;
title = `The ${addon.name} service ran out of memory`;
message = 'The service has been restarted automatically. If you see this notification often, consider increasing the [memory limit](https://cloudron.io/documentation/troubleshooting/#services)';
} else { // this never happens currently
program = containerId;
program = `Container ${containerId}`;
title = `The container ${containerId} ran out of memory`;
message = 'The container has been restarted automatically. Consider increasing the [memory limit](https://docs.docker.com/v17.09/edge/engine/reference/commandline/update/#update-a-containers-kernel-memory-constraints)';
}