ui ui ui ui

This commit is contained in:
Andras Bacsai
2024-03-25 11:33:38 +01:00
parent a66090b594
commit 9ad6ce5851
41 changed files with 203 additions and 289 deletions

View File

@@ -1,5 +1,5 @@
<form class="flex flex-col gap-2 rounded" wire:submit='submit'>
<x-forms.input placeholder="Run cron" id="name" label="Name" />
<form class="flex flex-col w-full gap-2 rounded" wire:submit='submit'>
<x-forms.input autofocus placeholder="Run cron" id="name" label="Name" />
<x-forms.input placeholder="php artisan schedule:run" id="command" label="Command" />
<x-forms.input placeholder="0 0 * * * or daily" id="frequency" label="Frequency" />
<x-forms.input placeholder="php" id="container"

View File

@@ -1,28 +1,23 @@
<div>
<div class="flex gap-2">
<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>
<x-modal-input buttonTitle="+ Add" title="New Scheduled Task">
<livewire:project.shared.scheduled-task.add />
</x-modal-input>
</div>
<div class="flex flex-wrap gap-2 pt-4">
@forelse($resource->scheduled_tasks as $task)
<a class="flex flex-col box"
@if ($resource->type() == 'application')
href="{{ route('project.application.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">
@if ($resource->type() == 'application') href="{{ route('project.application.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">
@elseif ($resource->type() == 'service')
href="{{ route('project.service.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">
@endif
<div><span class="font-bold dark: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
<div>No scheduled tasks configured.</div>
@endforelse
href="{{ route('project.service.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}"> @endif
<div><span class="font-bold dark: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
<div>No scheduled tasks configured.</div>
@endforelse
</div>
</div>