2024-01-01 18:33:16 +00:00
|
|
|
<div>
|
|
|
|
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Scheduled Task">
|
|
|
|
<x-slot:modalBody>
|
|
|
|
<p>Are you sure you want to delete this scheduled task <span
|
|
|
|
class="font-bold text-warning">({{ $task->name }})</span>?</p>
|
|
|
|
</x-slot:modalBody>
|
|
|
|
</x-modal>
|
2024-01-02 02:23:29 +00:00
|
|
|
|
2024-01-05 05:26:51 +00:00
|
|
|
<h1>Scheduled Task</h1>
|
2024-01-05 05:06:36 +00:00
|
|
|
@if ($type === 'application')
|
2024-01-10 11:41:29 +00:00
|
|
|
<livewire:project.application.heading :application="$resource" />
|
2024-01-05 05:06:36 +00:00
|
|
|
@elseif ($type === 'service')
|
2024-01-10 11:41:29 +00:00
|
|
|
<livewire:project.service.navbar :service="$resource" :parameters="$parameters" />
|
2024-01-05 05:06:36 +00:00
|
|
|
@endif
|
2024-01-02 02:23:29 +00:00
|
|
|
|
2024-01-10 11:41:29 +00:00
|
|
|
<form wire:submit="submit" class="w-full">
|
|
|
|
<div class="flex flex-col gap-2 pb-4">
|
2024-01-02 02:23:29 +00:00
|
|
|
<div class="flex items-end gap-2 pt-4">
|
|
|
|
<h2>Scheduled Task</h2>
|
|
|
|
<x-forms.button type="submit">
|
|
|
|
Save
|
|
|
|
</x-forms.button>
|
|
|
|
|
|
|
|
<x-forms.button isError isModal modalId="{{ $modalId }}">
|
|
|
|
Delete
|
|
|
|
</x-forms.button>
|
|
|
|
|
|
|
|
</div>
|
2024-01-01 18:33:16 +00:00
|
|
|
</div>
|
2024-01-10 11:41:29 +00:00
|
|
|
<div class="flex w-full gap-2">
|
|
|
|
<x-forms.input placeholder="Name" id="task.name" label="Name" required />
|
|
|
|
<x-forms.input placeholder="php artisan schedule:run" id="task.command" label="Command" required />
|
|
|
|
<x-forms.input placeholder="0 0 * * * or daily" id="task.frequency" label="Frequency" required />
|
|
|
|
<x-forms.input placeholder="php" helper="You can leave it empty if your resource only have one container."
|
|
|
|
id="task.container" label="Container name" />
|
|
|
|
</div>
|
2024-01-01 18:33:16 +00:00
|
|
|
</form>
|
2024-01-05 05:06:36 +00:00
|
|
|
|
2024-01-10 11:41:29 +00:00
|
|
|
<div class="pt-4">
|
2024-01-05 05:06:36 +00:00
|
|
|
<h3 class="py-4">Recent executions</h3>
|
2024-01-10 11:41:29 +00:00
|
|
|
<livewire:project.shared.scheduled-task.executions key="{{ $task->id }}" selectedKey="" :executions="$task->executions->take(-20)" />
|
2024-01-05 05:06:36 +00:00
|
|
|
</div>
|
2024-01-01 18:33:16 +00:00
|
|
|
</div>
|