eventlog: fix the description in app context

This commit is contained in:
Girish Ramakrishnan
2026-02-17 15:41:09 +01:00
parent d78944e03b
commit 66f65093fc
2 changed files with 10 additions and 8 deletions
+5 -7
View File
@@ -223,9 +223,8 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
return appName('', data.app, 'App') + ' was re-configured'; // re-configure of email apps is more common?
case EVENTS.APP_LOGIN: {
// const app = getApp(data.appId);
if (!app) return '';
return 'App ' + app.fqdn + ' logged in';
return appName('', app, 'App') + ' logged in';
}
case EVENTS.APP_OOM:
@@ -297,11 +296,11 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
return `Backup site ${data.name} removed`;
case EVENTS.BACKUP_INTEGRITY_START:
return `Backup integrity check started for ${data.backupId}`;
return 'Backup integrity check started'; // for ${data.backupId}
case EVENTS.BACKUP_INTEGRITY_FINISH:
if (!errorMessage) return `Backup integrity check of ${data.backupId} ${data.status}`;
else return `Backup integrity check of ${data.backupId} errored: ${errorMessage}`;
if (!errorMessage) return `Backup integrity check ${data.status}`; // passed or failed
else return `Backup integrity check errored: ${errorMessage}`;
case EVENTS.BRANDING_AVATAR:
return 'Cloudron Avatar Changed';
@@ -430,8 +429,7 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
if (data.mailboxId) {
return 'User ' + (data.user ? data.user.username : data.userId) + ' logged in to mailbox ' + data.mailboxId;
} else if (data.appId) {
// const app = getApp(data.appId);
return 'User ' + (data.user ? data.user.username : data.userId) + ' logged in to ' + (app ? app.fqdn : data.appId);
return 'User ' + (data.user ? data.user.username : data.userId) + ' logged in' + (appIdContext ? '' : ' to ' + (app ? app.fqdn : data.appId));
} else { // can happen with directoryserver
return 'User ' + (data.user ? data.user.username : data.userId) + ' authenticated';
}