80 lines
2.9 KiB
PHP
80 lines
2.9 KiB
PHP
<div>
|
|
<div class="flex gap-2 my-auto mb-4">
|
|
<input
|
|
|
|
type="text"
|
|
wire:model="query"
|
|
wire:keydown.debounce.500ms="search"
|
|
class="border p-2 rounded"
|
|
placeholder="Search bots"
|
|
/>
|
|
</div>
|
|
<div wire:loading wire:target.delay.longer="search">
|
|
Searching
|
|
<i class="fas fa-spinner fa-spin"></i>
|
|
</div>
|
|
<table class="table w-full" wire:loading.remove>
|
|
<thead>
|
|
<tr>
|
|
<th class="px-4 py-2">Name</th>
|
|
<th class="px-4 py-2">Schema</th>
|
|
<th class="px-4 py-2">Schedule</th>
|
|
<th class="px-4 py-2">Next due</th>
|
|
<th class="px-4 py-2">Enabled</th>
|
|
<th class="px-4 py-2">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="text-center">
|
|
@foreach ($bots as $bot)
|
|
<tr>
|
|
<td class="px-4 py-2">
|
|
<a
|
|
wire:navigate
|
|
href="{{ route('bots.show', $bot) }}"
|
|
class="text-blue-500"
|
|
>
|
|
{{ $bot->name }}
|
|
</a>
|
|
</td>
|
|
<td class="px-4 py-2">{{ $bot->class_name }}</td>
|
|
<td class="px-4 py-2">
|
|
{{ $bot->schedule }}
|
|
<span class="text-gray-300">
|
|
({{ $bot->cron_to_human }})
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-2">{{ $bot->next_due }}</td>
|
|
<td class="px-4 py-2">
|
|
<input
|
|
type="checkbox"
|
|
@checked($bot->enabled)
|
|
wire:click="toggleBot({{ $bot->id }})"
|
|
/>
|
|
</td>
|
|
<td class="text-xs">
|
|
<button
|
|
wire:click="runBot({{ $bot->id }})"
|
|
class="ml-4 cursor-pointer"
|
|
>
|
|
<i class="fas fa-play"></i>
|
|
</button>
|
|
<button
|
|
href="{{ route('bots.edit', $bot) }}"
|
|
wire:navigate
|
|
class="ml-4 cursor-pointer"
|
|
>
|
|
<i class="fas fa-edit"></i>
|
|
</button>
|
|
<button
|
|
wire:click="deleteBot({{ $bot->id }})"
|
|
class="ml-4 cursor-pointer"
|
|
>
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|