2023-10-13 15:45:24 +02:00
|
|
|
<div class="flex flex-col-reverse gap-2">
|
2023-08-10 15:52:54 +02:00
|
|
|
@forelse($executions as $execution)
|
2023-10-24 14:31:28 +02:00
|
|
|
<form wire:key="{{ data_get($execution, 'id') }}" class="flex flex-col p-2 border-dotted border-1 bg-coolgray-300"
|
|
|
|
@class([
|
|
|
|
'border-green-500' => data_get($execution, 'status') === 'success',
|
|
|
|
'border-red-500' => data_get($execution, 'status') === 'failed',
|
|
|
|
])>
|
2023-10-13 15:45:24 +02:00
|
|
|
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
|
2023-08-11 20:19:42 +02:00
|
|
|
<div>Status: {{ data_get($execution, 'status') }}</div>
|
2023-10-13 15:45:24 +02:00
|
|
|
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
2023-08-11 20:19:42 +02:00
|
|
|
@if (data_get($execution, 'message'))
|
|
|
|
<div>Message: {{ data_get($execution, 'message') }}</div>
|
2023-08-10 15:52:54 +02:00
|
|
|
@endif
|
2023-08-11 20:19:42 +02:00
|
|
|
<div>Size: {{ data_get($execution, 'size') }} B / {{ round((int) data_get($execution, 'size') / 1024, 2) }}
|
2023-10-13 15:45:24 +02:00
|
|
|
kB / {{ round((int) data_get($execution, 'size') / 1024 / 1024, 3) }} MB
|
2023-08-10 15:52:54 +02:00
|
|
|
</div>
|
2023-10-13 15:45:24 +02:00
|
|
|
<div>Location: {{ data_get($execution, 'filename', 'N/A') }}</div>
|
2023-10-24 14:31:28 +02:00
|
|
|
<div class="flex gap-2">
|
|
|
|
<div class="flex-1"></div>
|
|
|
|
|
|
|
|
{{-- @if (data_get($execution, 'status') !== 'failed') --}}
|
|
|
|
{{-- <x-forms.button class="bg-coollabs-100 hover:bg-coollabs" wire:click="download">Download</x-forms.button> --}}
|
|
|
|
{{-- @endif --}}
|
|
|
|
<x-forms.button isError onclick="sure({{ data_get($execution, 'id') }})">Delete</x-forms.button>
|
|
|
|
</div>
|
2023-08-10 15:52:54 +02:00
|
|
|
</form>
|
|
|
|
@empty
|
2023-08-10 17:55:03 +02:00
|
|
|
<div>No executions found.</div>
|
2023-08-10 15:52:54 +02:00
|
|
|
@endforelse
|
2023-10-24 14:31:28 +02:00
|
|
|
<script>
|
|
|
|
function sure($id) {
|
|
|
|
const sure = confirm('Are you sure you want to delete this backup?');
|
|
|
|
if (sure) {
|
|
|
|
Livewire.emit('deleteBackup', $id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2023-08-10 15:52:54 +02:00
|
|
|
</div>
|