Datensicherung, Footer, Update-Funktion, Docker-Setup

This commit is contained in:
2026-07-03 16:38:58 +02:00
parent aa0a810d63
commit 5af2b1e076
11 changed files with 199 additions and 28 deletions
+11 -2
View File
@@ -34,14 +34,23 @@
<div class="flex items-center justify-end mt-4">
@if (Route::has('password.request'))
<a class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" href="{{ route('password.request') }}">
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" href="{{ route('password.request') }}">
{{ __('Forgot your password?') }}
</a>
@endif
<x-primary-button class="ms-3">
{{ __('Log in') }}
Anmelden
</x-primary-button>
</div>
@if (Route::has('register'))
<div class="mt-4 pt-4 border-t border-gray-200 dark:border-gray-600 text-center">
<a href="{{ route('register') }}"
class="inline-block w-full text-center px-4 py-2 text-sm font-medium rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition">
Neuen Benutzer registrieren
</a>
</div>
@endif
</form>
</x-guest-layout>
+99
View File
@@ -0,0 +1,99 @@
<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>
+22 -16
View File
@@ -29,23 +29,29 @@
}
</style>
</head>
<body class="font-sans antialiased">
<div class="min-h-screen bg-gray-100 dark:bg-gray-900">
@include('layouts.navigation')
<body class="font-sans antialiased min-h-screen flex flex-col bg-gray-100 dark:bg-gray-900">
<!-- Page Heading -->
@isset($header)
<header class="bg-white dark:bg-gray-800 shadow">
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
{{ $header }}
</div>
</header>
@endisset
@include('layouts.navigation')
<!-- Page Content -->
<main>
{{ $slot }}
</main>
</div>
<!-- Page Heading -->
@isset($header)
<header class="bg-white dark:bg-gray-800 shadow">
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
{{ $header }}
</div>
</header>
@endisset
<!-- Page Content -->
<main class="flex-1">
{{ $slot }}
</main>
<!-- Footer -->
<footer class="bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700">
<div class="max-w-7xl mx-auto py-3 px-4 sm:px-6 lg:px-8 text-center text-xs text-gray-400 dark:text-gray-500">
&copy; {{ date('Y') }} MMS-Systemservice GmbH
</div>
</footer>
</body>
</html>
+1 -1
View File
@@ -18,7 +18,7 @@
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100">
<div>
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
<x-application-logo style="width:400px;height:400px;" class="fill-current text-gray-500" />
</a>
</div>
@@ -83,6 +83,13 @@
</x-slot>
</x-dropdown>
{{-- Datensicherung --}}
@role('admin')
<x-nav-link :href="route('backup.index')" :active="request()->routeIs('backup.*')">
💾 Datensicherung
</x-nav-link>
@endrole
{{-- Hilfe-Dropdown --}}
<x-dropdown align="left" width="48">
<x-slot name="trigger">
@@ -190,6 +197,14 @@
</x-responsive-nav-link>
</div>
@role('admin')
<div class="pt-2 pb-1 border-t border-gray-200">
<x-responsive-nav-link :href="route('backup.index')" :active="request()->routeIs('backup.*')">
&nbsp;&nbsp;💾 Datensicherung
</x-responsive-nav-link>
</div>
@endrole
<div class="pt-2 pb-1 border-t border-gray-200">
<div class="px-4 py-1 text-xs font-semibold text-gray-400 uppercase tracking-wider">Hilfe</div>
<x-responsive-nav-link :href="route('help.manual')">