fix: backup executions view

This commit is contained in:
Andras Bacsai 2024-06-05 11:44:10 +02:00
parent f5ccebfd41
commit 4fd3185d12
5 changed files with 6 additions and 7 deletions

View File

@ -50,7 +50,7 @@ public function download_file($exeuctionId)
public function refreshBackupExecutions(): void
{
if ($this->backup) {
$this->executions = $this->backup->executions()->get()->sortByDesc('created_at');
$this->executions = $this->backup->executions()->get();
}
}
}

View File

@ -1,4 +1,4 @@
<div>
<div wire:init='refreshBackupExecutions'>
@isset($backup)
<div class="flex items-center gap-2">
<h3 class="py-4">Executions</h3>

View File

@ -4,6 +4,6 @@
<livewire:project.database.heading :database="$database" />
<div class="pt-6">
<livewire:project.database.backup-edit :backup="$backup" :s3s="$s3s" :status="data_get($database, 'status')" />
<livewire:project.database.backup-executions :backup="$backup" :executions="$executions" />
<livewire:project.database.backup-executions :backup="$backup" />
</div>
</div>

View File

@ -3,7 +3,7 @@
<livewire:project.shared.configuration-checker :resource="$database" />
<livewire:project.database.heading :database="$database" />
<div class="pt-6">
<div class="flex gap-2 ">
<div class="flex gap-2">
<h2 class="pb-4">Scheduled Backups</h2>
<x-modal-input buttonTitle="+ Add" title="New Scheduled Backup">
<livewire:project.database.create-scheduled-backup :database="$database" :s3s="$s3s" />

View File

@ -1,5 +1,5 @@
<div>
<div class="flex flex-wrap gap-2">
<div class="flex flex-col gap-2">
@forelse($database->scheduledBackups as $backup)
@if ($type == 'database')
<a class="box"
@ -32,8 +32,7 @@
<livewire:project.database.backup-edit wire:key="{{ $selectedBackup->id }}" :backup="$selectedBackup"
:s3s="$s3s" :status="data_get($database, 'status')" />
<h3 class="py-4">Executions</h3>
<livewire:project.database.backup-executions wire:keykey="{{ $selectedBackup->id }}" :backup="$selectedBackup"
:executions="$selectedBackup->executions" />
<livewire:project.database.backup-executions wire:key="{{ $selectedBackup->id }}" :backup="$selectedBackup" />
</div>
@endif
</div>