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

54 lines
2.8 KiB
PHP
Raw Normal View History

2024-01-01 18:33:16 +00:00
<div>
2024-06-07 09:01:10 +00:00
<x-slot:title>
{{ data_get_str($resource, 'name')->limit(10) }} > Scheduled Tasks | Coolify
2024-08-16 19:22:06 +00:00
</x-slot>
@if ($type === 'application')
<h1>Scheduled Task</h1>
2024-01-10 11:41:29 +00:00
<livewire:project.application.heading :application="$resource" />
2024-08-16 19:22:06 +00:00
@elseif ($type === 'service')
2024-01-10 11:41:29 +00:00
<livewire:project.service.navbar :service="$resource" :parameters="$parameters" />
2024-08-16 19:22:06 +00:00
@endif
2024-01-10 11:41:29 +00: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-08-30 18:33:12 +00:00
<x-modal-confirmation
2024-09-04 17:44:10 +00:00
title="Confirm Scheduled Task Deletion?"
isErrorButton
buttonTitle="Delete"
submitAction="delete({{ $task->id }})"
:actions="['The selected scheduled task will be permanently deleted.']"
confirmationText="{{ $task->name }}"
confirmationLabel="Please confirm the execution of the actions by entering the Scheduled Task Name below"
shortConfirmationLabel="Scheduled Task Name"
:confirmWithPassword="false"
step2ButtonText="Permanently Delete Scheduled Task"
2024-08-30 18:33:12 +00:00
/>
</div>
2024-08-16 19:22:06 +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 />
@if ($type === 'application')
<x-forms.input placeholder="php"
2024-09-03 02:43:16 +00:00
helper="You can leave this empty if your resource only has one container." id="task.container"
label="Container name" />
2024-08-16 19:22:06 +00:00
@elseif ($type === 'service')
<x-forms.input placeholder="php"
2024-09-03 02:43:16 +00:00
helper="You can leave this empty if your resource only has 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" />
2024-08-16 19:22:06 +00:00
@endif
</div>
</form>
2024-08-16 19:22:06 +00:00
<div class="pt-4">
<h3 class="py-4">Recent executions <span class="text-xs text-neutral-500">(click to check output)</span></h3>
2024-09-03 15:35:18 +00:00
<livewire:project.shared.scheduled-task.executions :task="$task" key="{{ $task->id }}" selectedKey="" :executions="$task->executions->take(20)" />
2024-08-16 19:22:06 +00:00
</div>
2024-01-01 18:33:16 +00:00
</div>