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>
|
|
|
|
<x-slide-over>
|
|
|
|
<x-slot:title>New Scheduled Task</x-slot:title>
|
|
|
|
<x-slot:content>
|
|
|
|
<livewire:project.shared.scheduled-task.add />
|
|
|
|
</x-slot:content>
|
|
|
|
<button @click="slideOverOpen=true" class="button">+ Add</button>
|
|
|
|
</x-slide-over>
|
2024-01-02 02:23:29 +00:00
|
|
|
</div>
|
2024-03-19 14:37:16 +00:00
|
|
|
<div class="flex flex-wrap gap-2 pt-4">
|
2024-01-02 02:23:29 +00:00
|
|
|
@forelse($resource->scheduled_tasks as $task)
|
|
|
|
<a class="flex flex-col box"
|
2024-01-05 05:06:36 +00:00
|
|
|
@if ($resource->type() == 'application')
|
2024-01-02 02:23:29 +00:00
|
|
|
href="{{ route('project.application.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">
|
2024-01-05 05:06:36 +00:00
|
|
|
@elseif ($resource->type() == 'service')
|
|
|
|
href="{{ route('project.service.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">
|
|
|
|
@endif
|
2024-01-02 02:23:29 +00:00
|
|
|
<div><span class="font-bold text-warning">{{ $task->name }}<span></div>
|
|
|
|
<div>Frequency: {{ $task->frequency }}</div>
|
|
|
|
<div>Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}</div>
|
|
|
|
</a>
|
|
|
|
@empty
|
2024-01-10 14:42:54 +00:00
|
|
|
<div class="text-neutral-500">No scheduled tasks configured.</div>
|
2024-01-02 02:23:29 +00:00
|
|
|
@endforelse
|
2024-01-01 18:33:16 +00:00
|
|
|
</div>
|
|
|
|
</div>
|