lasthourcloud/resources/views/livewire/server/all.blade.php

55 lines
2.1 KiB
PHP
Raw Normal View History

2023-08-29 12:36:17 +00:00
<div>
<div class="flex items-start gap-2">
<h1>Servers</h1>
2023-12-07 21:56:55 +00:00
<a wire:navigate class="text-white hover:no-underline" href="{{ route('server.create') }}">
2023-08-29 12:36:17 +00:00
<x-forms.button class="btn">+ Add</x-forms.button>
</a>
</div>
<div class="subtitle ">All Servers</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($servers as $server)
2023-12-07 21:56:55 +00:00
<a wire:navigate href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
2023-08-29 12:36:17 +00:00
@class([
'gap-2 border cursor-pointer box group',
'border-transparent' => $server->settings->is_reachable,
'border-red-500' => !$server->settings->is_reachable,
])>
<div class="flex flex-col mx-6">
2023-10-10 08:56:11 +00:00
<div class="font-bold text-white">
2023-08-29 12:36:17 +00:00
{{ $server->name }}
</div>
2023-10-20 07:29:09 +00:00
<div class="description">
2023-08-29 12:36:17 +00:00
{{ $server->description }}</div>
<div class="flex gap-1 text-xs text-error">
@if (!$server->settings->is_reachable)
<span>Not reachable</span>
@endif
@if (!$server->settings->is_reachable && !$server->settings->is_usable)
&
@endif
@if (!$server->settings->is_usable)
<span>Not usable by Coolify</span>
@endif
</div>
</div>
<div class="flex-1"></div>
</a>
@empty
<div>
<div>No servers found. Without a server, you won't be able to do much.</div>
<x-use-magic-bar link="/server/new" />
</div>
@endforelse
@isset($error)
<div class="text-center text-error">
<span>{{ $error }}</span>
</div>
@endisset
<script>
function goto(uuid) {
window.location.href = '/server/' + uuid;
}
</script>
</div>
</div>