integrity: add eventlog status for historic checks
This commit is contained in:
+14
-5
@@ -119,6 +119,8 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
const ACTION_BACKUP_START = 'backup.start';
|
||||
const ACTION_BACKUP_CLEANUP_START = 'backup.cleanup.start';
|
||||
const ACTION_BACKUP_CLEANUP_FINISH = 'backup.cleanup.finish';
|
||||
const ACTION_BACKUP_INTEGRITY_START = 'backup.integrity.start';
|
||||
const ACTION_BACKUP_INTEGRITY_FINISH = 'backup.integrity.finish';
|
||||
|
||||
const ACTION_BACKUP_SITE_ADD = 'backupsite.add';
|
||||
const ACTION_BACKUP_SITE_REMOVE = 'backupsite.remove';
|
||||
@@ -310,7 +312,7 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
|
||||
case ACTION_APP_BACKUP_FINISH:
|
||||
if (!data.app) return '';
|
||||
if (data.errorMessage) return 'Backup ' + appName('of', data.app) + ' failed: ' + data.errorMessage;
|
||||
if (errorMessage) return 'Backup ' + appName('of', data.app) + ' failed: ' + errorMessage;
|
||||
else return 'Backup ' + appName('of', data.app) + ' succeeded';
|
||||
|
||||
case ACTION_APP_CLONE:
|
||||
@@ -368,7 +370,7 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
return 'Backup cleaner started';
|
||||
|
||||
case ACTION_BACKUP_CLEANUP_FINISH:
|
||||
return data.errorMessage ? 'Backup cleaner errored: ' + data.errorMessage : 'Backup cleaner removed ' + (data.removedBoxBackupPaths ? data.removedBoxBackupPaths.length : '0') + ' backup(s)';
|
||||
return errorMessage ? 'Backup cleaner errored: ' + errorMessage : 'Backup cleaner removed ' + (data.removedBoxBackupPaths ? data.removedBoxBackupPaths.length : '0') + ' backup(s)';
|
||||
|
||||
case ACTION_BACKUP_SITE_ADD:
|
||||
return `New backup site ${data.name} added with provider ${data.provider} and format ${data.format}`;
|
||||
@@ -395,6 +397,13 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
case ACTION_BACKUP_SITE_REMOVE:
|
||||
return `Backup site ${data.name} removed`;
|
||||
|
||||
case ACTION_BACKUP_INTEGRITY_START:
|
||||
return `Backup integrity check started for ${data.backupId}`;
|
||||
|
||||
case ACTION_BACKUP_INTEGRITY_FINISH:
|
||||
if (!errorMessage) return `Backup integrity check of ${data.backupId} ${data.status}`;
|
||||
else return `Backup integrity check of ${data.backupId} errored: ${errorMessage}`;
|
||||
|
||||
case ACTION_BRANDING_AVATAR:
|
||||
return 'Cloudron Avatar Changed';
|
||||
|
||||
@@ -503,7 +512,7 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
return 'Cloudron update to version ' + data.boxUpdateInfo.version + ' was started';
|
||||
|
||||
case ACTION_UPDATE_FINISH:
|
||||
if (data.errorMessage) return 'Cloudron update errored. Error: ' + data.errorMessage;
|
||||
if (errorMessage) return 'Cloudron update errored. Error: ' + errorMessage;
|
||||
else return 'Cloudron updated to version ' + data.newVersion;
|
||||
|
||||
case ACTION_USER_ADD:
|
||||
@@ -538,10 +547,10 @@ function eventlogDetails(eventLog, app = null, appIdContext = '') {
|
||||
return 'User directory profile config updated. Mandatory 2FA: ' + (data.config.mandatory2FA) + ' Lock profiles: ' + (data.config.lockUserProfiles);
|
||||
|
||||
case ACTION_DYNDNS_UPDATE: {
|
||||
details = data.errorMessage ? 'Error updating DNS. ' : 'Updated DNS. ';
|
||||
details = errorMessage ? 'Error updating DNS. ' : 'Updated DNS. ';
|
||||
if (data.fromIpv4 !== data.toIpv4) details += 'From IPv4 ' + data.fromIpv4 + ' to ' + data.toIpv4 + '. ';
|
||||
if (data.fromIpv6 !== data.toIpv6) details += 'From IPv6 ' + data.fromIpv6 + ' to ' + data.toIpv6 + '.';
|
||||
if (data.errorMessage) details += ' ' + data.errorMessage;
|
||||
if (errorMessage) details += ' ' + errorMessage;
|
||||
return details;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user