flow to add new destinations
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<x-layout>
|
||||
<h1>New Destination</h1>
|
||||
<livewire:destination.new.standalone-docker />
|
||||
<livewire:destination.new.standalone-docker :server_id="$server_id" />
|
||||
</x-layout>
|
||||
|
||||
@@ -4,24 +4,37 @@
|
||||
@endif
|
||||
@forelse ($servers as $server)
|
||||
<button @if ($chosenServer == $server->id) class="bg-blue-500" @endif
|
||||
wire:click="chooseServer({{ $server->id }})">{{ $server->name }}</button>
|
||||
wire:click="chooseServer({{ $server }})">{{ $server->name }}</button>
|
||||
@empty
|
||||
No servers found.
|
||||
<p>Did you forget to add a destination on the server?</p>
|
||||
@endforelse
|
||||
|
||||
@isset($chosenServer)
|
||||
<h1>Choose a destination</h1>
|
||||
<div>
|
||||
@foreach ($standalone_docker as $standalone)
|
||||
<button @if ($chosenDestination?->uuid == $standalone->uuid) class="bg-blue-500" @endif
|
||||
wire:click="setDestination('{{ $standalone->uuid }}','StandaloneDocker')">{{ $standalone->network }}</button>
|
||||
@endforeach
|
||||
@foreach ($swarm_docker as $standalone)
|
||||
<button @if ($chosenDestination?->uuid == $standalone->uuid) class="bg-blue-500" @endif
|
||||
wire:click="setDestination('{{ $standalone->uuid }}','SwarmDocker')">{{ $standalone->uuid }}</button>
|
||||
@endforeach
|
||||
</div>
|
||||
@if ($standalone_docker->count() > 0 || $swarm_docker->count() > 0)
|
||||
<h1>Choose a destination</h1>
|
||||
<div>
|
||||
@foreach ($standalone_docker as $standalone)
|
||||
<button @if ($chosenDestination?->uuid == $standalone->uuid) class="bg-blue-500" @endif
|
||||
wire:click="setDestination('{{ $standalone->uuid }}','StandaloneDocker')">{{ $standalone->network }}</button>
|
||||
@endforeach
|
||||
@foreach ($swarm_docker as $standalone)
|
||||
<button @if ($chosenDestination?->uuid == $standalone->uuid) class="bg-blue-500" @endif
|
||||
wire:click="setDestination('{{ $standalone->uuid }}','SwarmDocker')">{{ $standalone->uuid }}</button>
|
||||
@endforeach
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ route('destination.new', ['server_id' => $chosenServer['id']]) }}">Add
|
||||
a new
|
||||
destination</a>
|
||||
</div>
|
||||
@else
|
||||
<h1>No destinations found on this server.</h1>
|
||||
<a href="{{ route('destination.new', ['server_id' => $chosenServer['id']]) }}">Add
|
||||
a
|
||||
destination</a>
|
||||
@endif
|
||||
|
||||
@endisset
|
||||
|
||||
@isset($chosenDestination)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<x-layout>
|
||||
<h1>Server</h1>
|
||||
<livewire:server.form :server_id="$server->id" />
|
||||
<h2>Destinations</h2>
|
||||
<h2>Destinations <a href="{{ route('destination.new') }}"><button>New</button></h2>
|
||||
@if ($server->standaloneDockers)
|
||||
@foreach ($server->standaloneDockers as $docker)
|
||||
<p>Network: {{ data_get($docker, 'network') }}</p>
|
||||
|
||||
Reference in New Issue
Block a user