eventlog: fix the description in app context
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user