lasthourcloud/resources/views/livewire/project/database/scheduled-backups.blade.php

39 lines
2.0 KiB
PHP
Raw Normal View History

2023-11-07 11:11:47 +00:00
<div>
2024-06-05 09:44:10 +00:00
<div class="flex flex-col gap-2">
2023-11-07 11:11:47 +00:00
@forelse($database->scheduledBackups as $backup)
2024-03-21 11:44:32 +00:00
@if ($type == 'database')
2024-04-29 07:38:45 +00:00
<a class="box"
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
<div class="flex flex-col">
2024-03-25 10:33:38 +00:00
<div>Frequency: {{ $backup->frequency }}</div>
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
2024-04-29 07:38:45 +00:00
</div>
</a>
2023-11-07 11:11:47 +00:00
@else
2024-04-29 07:38:45 +00:00
<div class="box" wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')">
<div @class([
'border-coollabs' =>
data_get($backup, 'id') === data_get($selectedBackup, 'id'),
'flex flex-col border-l-2 border-transparent',
2024-04-29 07:38:45 +00:00
])>
<div>Frequency: {{ $backup->frequency }}</div>
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
</div>
2023-11-07 11:11:47 +00:00
</div>
@endif
@empty
<div>No scheduled backups configured.</div>
@endforelse
</div>
@if ($type === 'service-database' && $selectedBackup)
<div class="pt-10">
2024-03-25 10:33:38 +00:00
<livewire:project.database.backup-edit wire:key="{{ $selectedBackup->id }}" :backup="$selectedBackup"
:s3s="$s3s" :status="data_get($database, 'status')" />
2023-11-07 11:11:47 +00:00
<h3 class="py-4">Executions</h3>
2024-06-05 09:44:10 +00:00
<livewire:project.database.backup-executions wire:key="{{ $selectedBackup->id }}" :backup="$selectedBackup" />
2023-11-07 11:11:47 +00:00
</div>
@endif
</div>