Jurnal Activitate

Istoricul tuturor acțiunilor efectuate în contul tău

Exportă CSV
{{-- Statistici --}}

{{ number_format($stats['total']) }}

Total Activități

{{ $stats['today'] }}

Astăzi

{{ $stats['this_week'] }}

Săptămâna aceasta

{{ $stats['this_month'] }}

Luna aceasta

{{-- Filtre - pe un singur rând compact --}}
{{-- Lista activități --}}
@if($activities->count() > 0)
@foreach($activities as $activity) @php $createdAt = \Carbon\Carbon::parse($activity->created_at); @endphp
{{-- Icon --}}
@php $iconClass = match($activity->action ?? 'default') { 'create', 'created' => 'fas fa-plus bg-green-100 dark:bg-green-900/50 text-green-600 dark:text-green-400', 'update', 'updated' => 'fas fa-edit bg-blue-100 dark:bg-blue-900/50 text-blue-600 dark:text-blue-400', 'delete', 'deleted' => 'fas fa-trash bg-red-100 dark:bg-red-900/50 text-red-600 dark:text-red-400', 'login' => 'fas fa-sign-in-alt bg-purple-100 dark:bg-purple-900/50 text-purple-600 dark:text-purple-400', 'logout' => 'fas fa-sign-out-alt bg-gray-100 dark:bg-gray-900/50 text-gray-600 dark:text-gray-400', 'sync' => 'fas fa-sync bg-cyan-100 dark:bg-cyan-900/50 text-cyan-600 dark:text-cyan-400', default => 'fas fa-circle bg-gray-100 dark:bg-gray-900/50 text-gray-600 dark:text-gray-400', }; @endphp
{{-- Conținut --}}
{{-- Titlu și descriere --}}

{{ $activity->description ?? 'Acțiune necunoscută' }}

{{-- Detalii DNS dacă există --}} @if($activity->source === 'dns')
{{-- Domeniu --}} @if($activity->domain) {{ $activity->domain }} @endif {{-- Record name și type --}} @if($activity->record_name && $activity->record_type) {{ $activity->record_name }}.{{ $activity->domain }} ({{ $activity->record_type }}) @endif
{{-- Detalii modificări (old/new values) --}} @php $oldValues = $activity->old_values; $newValues = $activity->new_values; @endphp @if($oldValues || $newValues)
@if($activity->action === 'create' && $newValues) {{-- Creare - afișează noile valori --}}
Valoare: {{ $newValues['content'] ?? 'N/A' }} @if(isset($newValues['ttl'])) (TTL: {{ $newValues['ttl'] }}) @endif
@elseif($activity->action === 'update') {{-- Update - afișează vechi → nou --}} @if(isset($oldValues['content']) || isset($newValues['content']))
Content: @if(isset($oldValues['content'])) {{ $oldValues['content'] }} @endif {{ $newValues['content'] ?? 'N/A' }}
@endif @if((isset($oldValues['ttl']) || isset($newValues['ttl'])) && ($oldValues['ttl'] ?? null) !== ($newValues['ttl'] ?? null))
TTL: @if(isset($oldValues['ttl'])) {{ $oldValues['ttl'] }} @endif {{ $newValues['ttl'] ?? 'N/A' }}
@endif @elseif($activity->action === 'delete' && $oldValues) {{-- Ștergere - afișează valorile șterse --}}
Șters: {{ $oldValues['content'] ?? 'N/A' }}
@elseif($activity->action === 'toggle_status') {{-- Toggle status --}}
Status: @if(isset($newValues['is_active'])) @if($newValues['is_active']) Activat @else Dezactivat @endif @endif
@endif
@endif @endif {{-- Metadate --}}
{{ $createdAt->format('d.m.Y H:i:s') }} @if($activity->ip_address) {{ $activity->ip_address }} @endif @if($activity->action) {{ ucfirst(str_replace('_', ' ', $activity->action)) }} @endif @if($activity->source === 'dns') DNS @endif
{{-- Timp relativ --}}
{{ $createdAt->diffForHumans() }}
@endforeach
{{-- Paginare --}}
{{ $activities->withQueryString()->links() }}
@else

Nicio activitate găsită

Nu există înregistrări care să corespundă filtrelor selectate.

@endif
{{-- Curățare activitate veche --}}

Curăță activitatea veche

Șterge înregistrările mai vechi de un anumit număr de zile

@csrf