100 lines
6.4 KiB
PHP
100 lines
6.4 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200">💾 Datensicherung</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-8">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
|
|
|
{{-- Backup-Typen ------------------------------------------------}}
|
|
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-lg overflow-hidden">
|
|
<div class="px-4 py-3 bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600 flex items-center justify-between">
|
|
<span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
|
Backup-Typen
|
|
</span>
|
|
</div>
|
|
|
|
@if(empty($backupTypes))
|
|
<div class="px-4 py-12 text-center text-gray-400 dark:text-gray-500">
|
|
<div class="text-4xl mb-3">💾</div>
|
|
<p class="text-sm">Noch keine Backup-Typen konfiguriert.</p>
|
|
<p class="text-xs mt-1">Hier werden später die verfügbaren Backup-Typen angezeigt.</p>
|
|
</div>
|
|
@else
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 p-4">
|
|
@foreach($backupTypes as $type)
|
|
<div class="border border-gray-200 dark:border-gray-700 rounded-lg p-4 flex items-start gap-3">
|
|
<div class="text-2xl">{{ $type['icon'] }}</div>
|
|
<div class="flex-1 min-w-0">
|
|
<p class="font-medium text-sm text-gray-900 dark:text-gray-100">{{ $type['name'] }}</p>
|
|
<p class="text-xs text-gray-500 dark:text-gray-400 mt-0.5">{{ $type['description'] }}</p>
|
|
@if($type['last_run'])
|
|
<p class="text-xs text-gray-400 mt-1">
|
|
Zuletzt: {{ \Carbon\Carbon::parse($type['last_run'])->format('d.m.Y H:i') }}
|
|
</p>
|
|
@endif
|
|
@if($type['status'])
|
|
<span class="inline-block mt-1 px-2 py-0.5 text-xs rounded-full
|
|
{{ $type['status'] === 'ok' ? 'bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400' : 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400' }}">
|
|
{{ $type['status'] === 'ok' ? '✓ Erfolgreich' : '✗ Fehler' }}
|
|
</span>
|
|
@endif
|
|
</div>
|
|
<button class="text-xs text-indigo-600 hover:underline whitespace-nowrap">
|
|
Jetzt sichern
|
|
</button>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
{{-- Backup-Log --------------------------------------------------}}
|
|
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-lg overflow-hidden">
|
|
<div class="px-4 py-3 bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600">
|
|
<span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
|
Backup-Protokoll
|
|
</span>
|
|
</div>
|
|
|
|
@if($logs->isEmpty())
|
|
<div class="px-4 py-10 text-center text-gray-400 dark:text-gray-500 text-sm">
|
|
Noch keine Backup-Einträge vorhanden.
|
|
</div>
|
|
@else
|
|
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 text-sm">
|
|
<thead class="bg-gray-50 dark:bg-gray-700">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Zeitpunkt</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Typ</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Status</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Größe</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Meldung</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100 dark:divide-gray-700">
|
|
@foreach($logs as $log)
|
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700 transition">
|
|
<td class="px-4 py-3 text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap">
|
|
{{ \Carbon\Carbon::parse($log->created_at)->format('d.m.Y H:i') }}
|
|
</td>
|
|
<td class="px-4 py-3 text-xs text-gray-700 dark:text-gray-300">{{ $log->type }}</td>
|
|
<td class="px-4 py-3">
|
|
<span class="px-2 py-0.5 text-xs rounded-full
|
|
{{ $log->status === 'success' ? 'bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400' : 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400' }}">
|
|
{{ $log->status === 'success' ? '✓ OK' : '✗ Fehler' }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-xs text-gray-500 dark:text-gray-400">{{ $log->size ?? '—' }}</td>
|
|
<td class="px-4 py-3 text-xs text-gray-500 dark:text-gray-400">{{ $log->message ?? '—' }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endif
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|