Refactor destination.blade.php to include server and network information

This commit is contained in:
Andras Bacsai 2024-02-08 11:59:01 +01:00
parent 146fee14e5
commit 43d7f746e4

View File

@ -3,7 +3,8 @@
<div class="">Server related configurations.</div>
<div class="grid grid-cols-1 gap-4 py-4">
<div class="flex gap-2">
<div class="relative box w-96">
<div class="relative flex flex-col box w-96">
<div class="font-bold">Main Server</div>
@if (str($resource->realStatus())->startsWith('running'))
<div title="{{ $resource->realStatus() }}" class="absolute bg-success -top-1 -left-1 badge badge-xs">
</div>
@ -12,7 +13,10 @@
</div>
@endif
<div>
{{ data_get($resource, 'destination.server.name') }}/{{ data_get($resource, 'destination.network') }}
Server: {{ data_get($resource, 'destination.server.name') }}
</div>
<div>
Network: {{ data_get($resource, 'destination.network') }}
</div>
</div>
@if ($resource?->additional_networks?->count() > 0)
@ -23,7 +27,7 @@
@if ($resource?->additional_networks?->count() > 0)
@foreach ($resource->additional_networks as $destination)
<div class="flex gap-2">
<div class="relative box w-96">
<div class="relative flex flex-col box w-96">
@if (str(data_get($destination, 'pivot.status'))->startsWith('running'))
<div title="{{ data_get($destination, 'pivot.status') }}"
class="absolute bg-success -top-1 -left-1 badge badge-xs"></div>
@ -32,8 +36,12 @@ class="absolute bg-success -top-1 -left-1 badge badge-xs"></div>
class="absolute bg-error -top-1 -left-1 badge badge-xs"></div>
@endif
<div>
{{ data_get($destination, 'server.name') }}/{{ data_get($destination, 'network') }}
Server: {{ data_get($destination, 'server.name') }}
</div>
<div>
Network: {{ data_get($destination, 'network') }}
</div>
</div>
<x-forms.button
wire:click="redeploy('{{ data_get($destination, 'id') }}','{{ data_get($destination, 'server.id') }}')">Redeploy</x-forms.button>