@forelse ($executions as $execution)
@php
$executionStatus = data_get($execution, 'status');
[$executionStatusLabel, $executionStatusType] = match ($executionStatus) {
'success' => data_get($execution, 's3_uploaded') === false
? ['S3 warning', 'warning']
: ['Success', 'success'],
'running' => ['In progress', 'warning'],
'failed' => ['Failed', 'error'],
default => [str($executionStatus)->headline(), 'neutral'],
};
$executionCheckboxes = [];
$deleteActions = [];
if (! data_get($execution, 'local_storage_deleted', false)) {
$deleteActions[] = 'This backup will be permanently deleted from local storage.';
}
if (data_get($execution, 's3_uploaded') === true
&& ! data_get($execution, 's3_storage_deleted', false)) {
$executionCheckboxes[] = [
'id' => 'delete_backup_s3',
'label' => 'Delete the selected backup permanently from S3 Storage',
];
}
if (empty($deleteActions)) {
$deleteActions[] = 'This backup execution record will be deleted.';
}
@endphp
@if ($executionStatus === 'running')
@endif
{{ data_get($execution, 'database_name', 'N/A') }}
@if ($executionStatus === 'running')
Running now
@else
{{ \Carbon\Carbon::parse(data_get($execution, 'finished_at'))->diffForHumans() }}
@endif
{{ calculateDuration(
data_get($execution, 'created_at'),
$executionStatus === 'running' ? now() : data_get($execution, 'finished_at'),
) }}
{{ data_get($execution, 'size') ? formatBytes(data_get($execution, 'size')) : '-' }}
@if (data_get($execution, 's3_uploaded') !== null)
@endif
@if ($executionStatus === 'success')
@endif
Delete
@if (data_get($execution, 'message'))
{{ data_get($execution, 'message') }}
@endif
@empty
@endforelse
@if ($executions_count > 0)
{{ $executions_count }} execution{{ $executions_count === 1 ? '' : 's' }}
Page {{ $currentPage }} of {{ ceil($executions_count / $defaultTake) }}
@endif