diff --git a/dashboard/src/components/EventlogList.vue b/dashboard/src/components/EventlogList.vue index 49d3368b7..0f7e68f05 100644 --- a/dashboard/src/components/EventlogList.vue +++ b/dashboard/src/components/EventlogList.vue @@ -42,7 +42,7 @@ function processEvent(e) { return { id: Symbol(), raw: e, - details: eventlogDetails(e, app), + details: eventlogDetails(e, app, props.app?.id || ''), source: eventlogSource(e, app), }; } @@ -236,6 +236,10 @@ defineExpose({ refresh: onRefresh, setHighlight }); table-layout: fixed; } +.eventlog-table th { + text-align: left; +} + .eventlog-table th, .eventlog-table td { padding: 6px; diff --git a/dashboard/src/utils.js b/dashboard/src/utils.js index 1192054eb..30d82eb93 100644 --- a/dashboard/src/utils.js +++ b/dashboard/src/utils.js @@ -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'; }