@section('page-title', 'System Audit Logs Summary')

🔐 System Audit Logs Summary

Operational integrity logs, administrative activities, and security tracking footage

{{-- Export Audit Logs --}}
{{-- 1. KPI Cards (Top of Screen) --}}
{{-- Total Audit Records --}}
Total Records

{{ number_format($totalRecords) }}

{{-- Active Users Today --}}
Active Today

{{ $activeUsersToday }}

{{-- Successful Logins --}}
Logins (Success)

{{ $successfulLogins }}

{{-- Failed Logins --}}
Logins (Failed)

{{ $failedLogins }}

{{-- Client Changes --}}
Client Changes

{{ $clientChanges }}

{{-- Domain Changes --}}
Domain Actions

{{ $domainChanges }}

{{-- Hosting Changes --}}
Hosting Actions

{{ $hostingChanges }}

{{-- Invoice Changes --}}
Invoice Actions

{{ $invoiceChanges }}

{{-- Payment Changes --}}
Payments Logged

{{ $paymentChanges }}

{{-- Communication Activities --}}
Reminders Sent

{{ $commActivities }}

{{-- System Changes --}}
System Changes

{{ $systemChanges }}

{{-- WHM Sync Activities --}}
WHM Server Sync

{{ $whmSync }}

{{-- Security Events --}}
🚨 Security Events

{{ $securityEvents }}

{{-- Backup & Restore --}}
📦 Backup & Restore

{{ $backupRestore }}

{{-- Failed Operations --}}
⚠️ Failed Operations

{{ $failedOperations }}

{{-- 2. User Logins & IP Activity Distribution --}}
{{-- Top Active Staff Users --}}
Top Active Staff Users
@forelse($topUsers as $tu)
{{ $tu->user->name ?? 'System Process' }}
{{ $tu->user->email ?? 'N/A' }}
{{ $tu->action_count }} actions logged
@empty
No staff transactions recorded.
@endforelse
{{-- IP Address Activity Logs --}}
IP Address Activity Logs
@forelse($ipActivity as $ip)
{{ $ip->ip_address }}
Network Location IP
{{ $ip->action_count }} hits
@empty
No IP records logged.
@endforelse
{{-- 3. Filter form --}}
Reset
{{-- 4. Audit Logs Listing Table --}}
@forelse($logs as $log) @empty @endforelse
Timestamp User Activity Description IP Address
{{ $log->created_at->format('d M Y, H:i') }} @if($log->user) {{ $log->user->name }}
{{ $log->user->role }} @else System @endif
@php $badgeClass = match(true) { str_contains($log->activity, 'Delete') => 'bg-danger', str_contains($log->activity, 'Create') => 'bg-success', str_contains($log->activity, 'Update') => 'bg-warning text-dark', str_contains($log->activity, 'Import') => 'bg-info', default => 'bg-secondary', }; @endphp {{ $log->activity }} {{ $log->description }} {{ $log->ip_address ?? '—' }}
No audit logs found.
@if($logs->hasPages())
{{ $logs->links() }}
@endif
@section('scripts') @endsection