2023-06-13 08:02:58 +00:00
|
|
|
<x-layout>
|
2024-03-22 10:34:15 +00:00
|
|
|
<div class="flex items-start gap-2">
|
|
|
|
<h1>Destinations</h1>
|
2024-03-25 12:10:05 +00:00
|
|
|
@if ($servers->count() > 0)
|
|
|
|
<x-modal-input buttonTitle="+ Add" title="New Destination">
|
|
|
|
<livewire:destination.new.docker :server_id="$server_id" />
|
|
|
|
</x-modal-input>
|
|
|
|
@endif
|
2024-03-22 10:34:15 +00:00
|
|
|
</div>
|
2024-03-25 12:10:05 +00:00
|
|
|
<div class="subtitle">Network endpoints to deploy your resources.</div>
|
2024-03-25 18:07:59 +00:00
|
|
|
<div class="grid gap-2 lg:grid-cols-1">
|
2023-06-13 08:02:58 +00:00
|
|
|
@forelse ($destinations as $destination)
|
|
|
|
@if ($destination->getMorphClass() === 'App\Models\StandaloneDocker')
|
2024-03-25 18:07:59 +00:00
|
|
|
<div class="box group">
|
|
|
|
<a class="flex flex-col mx-6"
|
2023-08-11 18:19:42 +00:00
|
|
|
href="{{ route('destination.show', ['destination_uuid' => data_get($destination, 'uuid')]) }}">
|
2024-03-25 18:07:59 +00:00
|
|
|
<div class="box-title">{{ $destination->name }}</div>
|
|
|
|
<div class="box-description">server: {{ $destination->server->name }}</div>
|
2023-06-13 08:02:58 +00:00
|
|
|
</a>
|
2024-03-25 18:07:59 +00:00
|
|
|
</div>
|
2023-06-13 08:02:58 +00:00
|
|
|
@endif
|
|
|
|
@if ($destination->getMorphClass() === 'App\Models\SwarmDocker')
|
2024-03-25 18:07:59 +00:00
|
|
|
<div class="box group">
|
|
|
|
<a class="flex flex-col mx-6"
|
2023-08-11 18:19:42 +00:00
|
|
|
href="{{ route('destination.show', ['destination_uuid' => data_get($destination, 'uuid')]) }}">
|
2024-03-25 18:07:59 +00:00
|
|
|
<div class="box-title">{{ $destination->name }}</div>
|
|
|
|
<div class="box-description">server: {{ $destination->server->name }}</div>
|
2023-06-13 08:02:58 +00:00
|
|
|
</a>
|
2024-03-25 18:07:59 +00:00
|
|
|
</div>
|
2023-06-13 08:02:58 +00:00
|
|
|
@endif
|
|
|
|
@empty
|
|
|
|
<div>
|
2024-03-25 12:10:05 +00:00
|
|
|
@if ($servers->count() === 0)
|
2024-03-25 18:07:59 +00:00
|
|
|
<div>No servers found. Please add one first.</div>
|
2024-03-25 12:10:05 +00:00
|
|
|
@else
|
|
|
|
<div>No destinations found.</div>
|
|
|
|
@endif
|
2023-06-13 08:02:58 +00:00
|
|
|
</div>
|
|
|
|
@endforelse
|
|
|
|
</div>
|
|
|
|
</x-layout>
|