2023-06-15 13:38:15 +00:00
|
|
|
<div>
|
2023-09-12 11:14:01 +00:00
|
|
|
@if ($server->isFunctional())
|
2023-07-14 11:38:24 +00:00
|
|
|
<div class="flex items-end gap-2">
|
|
|
|
<h2>Destinations</h2>
|
2023-12-27 15:45:01 +00:00
|
|
|
<a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
|
2023-07-14 11:38:24 +00:00
|
|
|
<x-forms.button>Add a new destination</x-forms.button>
|
2023-06-15 13:38:15 +00:00
|
|
|
</a>
|
2023-07-14 11:38:24 +00:00
|
|
|
<x-forms.button wire:click='scan'>Scan destinations on the server</x-forms.button>
|
|
|
|
</div>
|
|
|
|
<div class="pt-2 pb-6 ">Destinations are used to segregate resources by network.</div>
|
|
|
|
<div class="flex gap-2 ">
|
|
|
|
Available for using:
|
|
|
|
@forelse ($server->standaloneDockers as $docker)
|
2023-12-27 15:45:01 +00:00
|
|
|
<a
|
2023-12-15 14:48:01 +00:00
|
|
|
href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
|
|
|
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
|
|
|
|
</a>
|
|
|
|
@empty
|
|
|
|
@endforelse
|
|
|
|
@forelse ($server->swarmDockers as $docker)
|
2023-12-27 15:45:01 +00:00
|
|
|
<a
|
2023-12-15 14:48:01 +00:00
|
|
|
href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
2023-07-14 11:38:24 +00:00
|
|
|
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
|
|
|
|
</a>
|
|
|
|
@empty
|
|
|
|
@endforelse
|
|
|
|
</div>
|
2023-08-23 08:14:39 +00:00
|
|
|
<div class="pt-2">
|
2023-07-14 11:38:24 +00:00
|
|
|
@if (count($networks) > 0)
|
2023-08-23 08:14:39 +00:00
|
|
|
<h3 class="pb-4">Found Destinations</h3>
|
2023-07-14 11:38:24 +00:00
|
|
|
@endif
|
2023-08-23 08:14:39 +00:00
|
|
|
<div class="flex flex-wrap gap-2 ">
|
2023-12-07 18:06:32 +00:00
|
|
|
@foreach ($networks as $network)
|
|
|
|
<div>
|
2023-12-27 15:45:01 +00:00
|
|
|
<a
|
2023-12-07 18:06:32 +00:00
|
|
|
href="{{ route('destination.new', ['server_id' => $server->id, 'network_name' => data_get($network, 'Name')]) }}">
|
|
|
|
<x-forms.button>+<x-highlighted text="{{ data_get($network, 'Name') }}" />
|
|
|
|
</x-forms.button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
2023-08-23 08:14:39 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-14 11:38:24 +00:00
|
|
|
@else
|
|
|
|
<div>Server is not validated. Validate first.</div>
|
|
|
|
@endif
|
2023-06-15 13:38:15 +00:00
|
|
|
</div>
|