1.0.38
This commit is contained in:
177 files changed
+21182
-1042
No files matched your search
@@ -281,6 +281,24 @@ export async function auditRegistry(
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for backup destination actions
|
||||
*/
|
||||
export async function auditBackupDestination(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
destinationId: number,
|
||||
destinationName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'backup_destination', {
|
||||
entityId: String(destinationId),
|
||||
entityName: destinationName,
|
||||
description: `Backup destination ${destinationName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for git repository actions
|
||||
*/
|
||||
@@ -455,3 +473,39 @@ export async function auditAuth(
|
||||
console.error('[Audit] Failed to log event:', errorMsg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for backup actions (backup run, cancel, config create/update/delete)
|
||||
*/
|
||||
export async function auditBackup(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
targetName: string,
|
||||
environmentId?: number | null,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'backup_config', {
|
||||
entityName: targetName,
|
||||
environmentId,
|
||||
description: `Backup ${targetName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for restore actions
|
||||
*/
|
||||
export async function auditRestore(
|
||||
event: RequestEvent,
|
||||
targetName: string,
|
||||
environmentId?: number | null,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, 'restore', 'backup_config', {
|
||||
entityName: targetName,
|
||||
environmentId,
|
||||
description: `Restore ${targetName}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user