2024-01-02 02:23:29 +00:00
|
|
|
<div>
|
|
|
|
<div class="flex gap-2">
|
2024-03-19 14:37:16 +00:00
|
|
|
<h2>Scheduled Tasks</h2>
|
2024-05-14 13:19:28 +00:00
|
|
|
<x-modal-input buttonTitle="+ Add" title="New Scheduled Task" :closeOutside=false>
|
|
|
|
@if ($resource->type() == 'application')
|
|
|
|
<livewire:project.shared.scheduled-task.add :type="$resource->type()" :containerNames="$containerNames"/>
|
|
|
|
@elseif ($resource->type() == 'service')
|
|
|
|
<livewire:project.shared.scheduled-task.add :type="$resource->type()" :containerNames="$containerNames"/>
|
|
|
|
@endif
|
2024-03-25 10:33:38 +00:00
|
|
|
</x-modal-input>
|
2024-01-02 02:23:29 +00:00
|
|
|
</div>
|
2024-05-29 08:43:49 +00:00
|
|
|
<div class="flex flex-col flex-wrap gap-2 pt-4">
|
2024-01-02 02:23:29 +00:00
|
|
|
@forelse($resource->scheduled_tasks as $task)
|
2024-05-14 10:45:21 +00:00
|
|
|
@if ($resource->type() == 'application')
|
|
|
|
<a class="box"
|
|
|
|
href="{{ route('project.application.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">
|
|
|
|
<span class="flex flex-col">
|
2024-05-14 13:19:28 +00:00
|
|
|
<span class="text-lg font-bold">{{ $task->name }}
|
|
|
|
@if ($task->container)
|
|
|
|
<span class="text-xs font-normal">({{ $task->container }})</span>
|
|
|
|
@endif
|
|
|
|
</span>
|
|
|
|
|
2024-05-14 10:45:21 +00:00
|
|
|
<span>Frequency: {{ $task->frequency }}</span>
|
|
|
|
<span>Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
@elseif ($resource->type() == 'service')
|
|
|
|
<a class="box"
|
|
|
|
href="{{ route('project.service.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">
|
|
|
|
<span class="flex flex-col">
|
2024-05-14 13:19:28 +00:00
|
|
|
<span class="text-lg font-bold">{{ $task->name }}
|
|
|
|
@if ($task->container)
|
|
|
|
<span class="text-xs font-normal">({{ $task->container }})</span>
|
|
|
|
@endif
|
|
|
|
</span>
|
2024-05-14 10:45:21 +00:00
|
|
|
<span>Frequency: {{ $task->frequency }}</span>
|
|
|
|
<span>Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
@empty
|
|
|
|
<div>No scheduled tasks configured.</div>
|
|
|
|
@endforelse
|
2024-01-01 18:33:16 +00:00
|
|
|
</div>
|
|
|
|
</div>
|