Audit Log
AuditLog
System-wide activity log viewer for admin security and compliance auditing.
AuditLog
Renders a paginated, filterable log of all system-wide admin actions — user changes, role assignments, billing events, login attempts — with actor, resource, action, timestamp, and an export-to-CSV action.
Components
<XAdminAuditLog />
Displays all audit log entries with filters by actor, resource type, action, and date range, plus a CSV export button.
<XAdminAuditLog />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
endpoint | string | '/api/admin/audit-log' | API endpoint for audit log data |
loading | boolean | false | Show loading skeleton |
pageSize | number | 50 | Number of log entries per page |
showFilters | boolean | true | Show actor, resource, and date range filters |
allowExport | boolean | true | Show CSV export button |
Types
interface AuditLogEntry {
id: string
actor: { id: string; name: string; email: string }
action: string
resource: string
resourceId?: string
metadata?: Record<string, unknown>
timestamp: string | Date
ipAddress?: string
}
AI Context
component: XAdminAuditLog
package: "@xenterprises/nuxt-x-app-admin"
category: AuditLog
use-when: Displaying a searchable, filterable system-wide audit trail for security and compliance review in an admin panel
