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

45 lines
2.3 KiB
PHP
Raw Normal View History

2024-01-01 19:33:16 +01:00
<div>
@if ($type === 'application')
<h1>Scheduled Task</h1>
2024-01-10 12:41:29 +01:00
<livewire:project.application.heading :application="$resource" />
@elseif ($type === 'service')
2024-01-10 12:41:29 +01:00
<livewire:project.service.navbar :service="$resource" :parameters="$parameters" />
@endif
2024-01-10 12:41:29 +01:00
<form wire:submit="submit" class="w-full">
<div class="flex flex-col gap-2 pb-2">
<div class="flex items-end gap-2 pt-4">
<h2>Scheduled Task</h2>
<x-forms.button type="submit">
Save
</x-forms.button>
2024-03-20 12:54:06 +01:00
<x-modal-confirmation isErrorButton buttonTitle="Delete Scheduled Task">
2024-03-25 10:41:44 +01:00
You will delete scheduled task <span class="font-bold dark:text-warning">{{ $task->name }}</span>.
2024-03-20 12:54:06 +01:00
</x-modal-confirmation>
</div>
<div class="w-48">
<x-forms.checkbox instantSave id="task.enabled" label="Enabled" />
</div>
2024-01-01 19:33:16 +01:00
</div>
2024-01-10 12:41:29 +01: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 />
@if ($type === 'application')
<x-forms.input placeholder="php"
helper="You can leave it empty if your resource only have one container." id="task.container"
label="Container name" />
@elseif ($type === 'service')
<x-forms.input placeholder="php"
helper="You can leave it empty if your resource only have one service in your stack. Otherwise use the stack name, without the random generated id. So if you have a mysql service in your stack, use mysql."
id="task.container" label="Service name" />
@endif
2024-01-10 12:41:29 +01:00
</div>
2024-01-01 19:33:16 +01:00
</form>
2024-01-10 12:41:29 +01:00
<div class="pt-4">
2024-02-14 15:14:06 +01:00
<h3 class="py-4">Recent executions <span class="text-xs text-neutral-500">(click to check output)</span></h3>
2024-01-10 12:41:29 +01:00
<livewire:project.shared.scheduled-task.executions key="{{ $task->id }}" selectedKey="" :executions="$task->executions->take(-20)" />
</div>
2024-01-01 19:33:16 +01:00
</div>