fix: no backup for redis

This commit is contained in:
Andras Bacsai 2023-10-13 09:39:40 +02:00
parent 38c6c1ee40
commit c970907c73
2 changed files with 14 additions and 7 deletions

View File

@ -68,6 +68,14 @@ public function backups()
if (!$database) {
return redirect()->route('dashboard');
}
// No backups for redis
if ($database->getMorphClass() === 'App\Models\StandaloneRedis') {
return redirect()->route('project.database.configuration', [
'project_uuid' => $project->uuid,
'environment_name' => $environment->name,
'database_uuid' => $database->uuid,
]);
}
return view('project.database.backups.all', [
'database' => $database,
's3s' => currentTeam()->s3s,

View File

@ -7,14 +7,13 @@
href="{{ route('project.database.logs', $parameters) }}">
<button>Logs</button>
</a>
@if ($database->getMorphClass() === 'App\Models\StandalonePostgresql')
<a class="{{ request()->routeIs('project.database.backups.all') ? 'text-white' : '' }}"
href="{{ route('project.database.backups.all', $parameters) }}">
<button>Backups</button>
</a>
{{-- <x-applications.links :application="$application" /> --}}
@endif
<div class="flex-1"></div>
{{-- <x-applications.advanced :application="$application" /> --}}
@if ($database->status !== 'exited')
<button wire:click='stop' class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24" stroke-width="2"