coolify/resources/views/livewire/project/shared/scheduled-task/executions.blade.php

36 lines
1.6 KiB
PHP
Raw Normal View History

2024-08-18 22:14:09 +00:00
<div class="flex flex-col-reverse gap-4">
@forelse($executions as $execution)
2024-08-16 16:01:55 +00:00
@if (data_get($execution, 'id') == $selectedKey)
2024-08-18 22:14:09 +00:00
<div class="p-4 mb-2 bg-gray-100 dark:bg-coolgray-200 rounded">
2024-08-16 16:01:55 +00:00
@if (data_get($execution, 'message'))
<div>
2024-08-18 22:14:09 +00:00
<pre class="whitespace-pre-wrap">{{ data_get($execution, 'message') }}</pre>
2024-08-16 16:01:55 +00:00
</div>
@else
<div>No output was recorded for this execution.</div>
2024-01-10 11:41:29 +00:00
@endif
2024-08-16 16:01:55 +00:00
</div>
@endif
2024-08-18 22:14:09 +00:00
<a wire:click="selectTask({{ data_get($execution, 'id') }})" @class([
'flex flex-col border-l-4 transition-colors cursor-pointer p-4 rounded',
'bg-white hover:bg-gray-100 dark:bg-coolgray-100 dark:hover:bg-coolgray-200',
'text-black dark:text-white',
'bg-gray-200 dark:bg-coolgray-200' => data_get($execution, 'id') == $selectedKey,
2024-08-16 16:01:55 +00:00
'border-green-500' => data_get($execution, 'status') === 'success',
'border-red-500' => data_get($execution, 'status') === 'failed',
2024-08-18 22:14:09 +00:00
'border-yellow-500' => data_get($execution, 'status') === 'running',
])>
2024-08-16 16:01:55 +00:00
@if (data_get($execution, 'status') === 'running')
<div class="absolute top-2 right-2">
<x-loading />
</div>
@endif
2024-08-18 22:14:09 +00:00
<div class="text-gray-700 dark:text-gray-300 font-semibold mb-1">Status: {{ data_get($execution, 'status') }}</div>
<div class="text-gray-600 dark:text-gray-400 text-sm">
Started At: {{ $this->formatDateInServerTimezone(data_get($execution, 'created_at', now())) }}
2024-08-16 16:01:55 +00:00
</div>
</a>
@empty
2024-08-18 22:14:09 +00:00
<div class="p-4 bg-gray-100 dark:bg-coolgray-200 rounded">No executions found.</div>
@endforelse
2024-08-18 22:14:09 +00:00
</div>