eventlog: rename backup site logs and fix eventlog summar
This commit is contained in:
+30
-6
@@ -75,7 +75,9 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
const ACTION_BACKUP_CLEANUP_START = 'backup.cleanup.start';
|
||||
const ACTION_BACKUP_CLEANUP_FINISH = 'backup.cleanup.finish';
|
||||
|
||||
const ACTION_BACKUPTARGET_ADD = 'backuptarget.add';
|
||||
const ACTION_BACKUP_SITE_ADD = 'backupsite.add';
|
||||
const ACTION_BACKUP_SITE_REMOVE = 'backupsite.remove';
|
||||
const ACTION_BACKUP_SITE_UPDATE = 'backupsite.update';
|
||||
|
||||
const ACTION_BRANDING_AVATAR = 'branding.avatar';
|
||||
const ACTION_BRANDING_NAME = 'branding.name';
|
||||
@@ -316,11 +318,11 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
return 'Backup ' + data.backupId + ' deleted from archive';
|
||||
|
||||
case ACTION_BACKUP_START:
|
||||
return 'Backup started';
|
||||
return `Backup started at ${data.siteName}`;
|
||||
|
||||
case ACTION_BACKUP_FINISH:
|
||||
if (!errorMessage) return 'Cloudron backup created at ' + data.remotePath;
|
||||
else return 'Cloudron backup errored with error: ' + errorMessage;
|
||||
if (!errorMessage) return `Cloudron backup created at site ${data.siteName} . Path(s): ${JSON.stringify(data.result)}`;
|
||||
else return `Cloudron backup at site ${data.siteName} errored with error: ${errorMessage}`;
|
||||
|
||||
case ACTION_BACKUP_CLEANUP_START:
|
||||
return 'Backup cleaner started';
|
||||
@@ -328,8 +330,30 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
case ACTION_BACKUP_CLEANUP_FINISH:
|
||||
return data.errorMessage ? 'Backup cleaner errored: ' + data.errorMessage : 'Backup cleaner removed ' + (data.removedBoxBackupPaths ? data.removedBoxBackupPaths.length : '0') + ' backups';
|
||||
|
||||
case ACTION_BACKUPTARGET_ADD:
|
||||
return `New backup ${data.name} site added`;
|
||||
case ACTION_BACKUP_SITE_ADD:
|
||||
return `New backup site ${data.name} added with provider ${data.provider} and format ${data.format}`;
|
||||
|
||||
case ACTION_BACKUP_SITE_UPDATE:
|
||||
if (data.schedule) {
|
||||
return `Backup site ${data.name} schedule was updated to ${data.schedule}`;
|
||||
} else if (data.limits) {
|
||||
return `Backup site ${data.name} limits were updated`;
|
||||
} else if (data.retention) {
|
||||
return `Backup site ${data.name} retention was updated`;
|
||||
} else if (data.contents) {
|
||||
return `Backup site ${data.name} contents were updated`;
|
||||
} else if (data.encryption) {
|
||||
return `Backup site ${data.name} encryption was ${data.encryption ? 'enabled' : 'disabled'}`;
|
||||
} else if (data.config) {
|
||||
return `Backup site ${data.name} credentials were updated`;
|
||||
} else if (data.oldName) {
|
||||
return `Backup site was renamed from ${data.oldName} to ${data.name}`;
|
||||
} else {
|
||||
return `Backup site ${data.name} was updated`;
|
||||
}
|
||||
|
||||
case ACTION_BACKUP_SITE_REMOVE:
|
||||
return `Backup site ${data.name} removed`;
|
||||
|
||||
case ACTION_BRANDING_AVATAR:
|
||||
return 'Cloudron Avatar Changed';
|
||||
|
||||
Reference in New Issue
Block a user