fix: add new destination
This commit is contained in:
parent
af6d94c0d8
commit
dbc55233cb
@ -109,9 +109,6 @@ class Select extends Component
|
|||||||
if (count($this->servers) === 1) {
|
if (count($this->servers) === 1) {
|
||||||
$server = $this->servers->first();
|
$server = $this->servers->first();
|
||||||
$this->setServer($server);
|
$this->setServer($server);
|
||||||
if (count($server->destinations()) === 1) {
|
|
||||||
$this->setDestination($server->destinations()->first()->uuid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!is_null($this->server)) {
|
if (!is_null($this->server)) {
|
||||||
$foundServer = $this->servers->where('id', $this->server)->first();
|
$foundServer = $this->servers->where('id', $this->server)->first();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@if ($server->isFunctional())
|
@if ($server->isFunctional())
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<h2>Destinations</h2>
|
<h2>Destinations</h2>
|
||||||
<a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
|
<a wire:navigate href="{{ route('destination.new', ['server_id' => $server->id]) }}">
|
||||||
<x-forms.button>Add a new destination</x-forms.button>
|
<x-forms.button>Add a new destination</x-forms.button>
|
||||||
</a>
|
</a>
|
||||||
<x-forms.button wire:click='scan'>Scan destinations on the server</x-forms.button>
|
<x-forms.button wire:click='scan'>Scan destinations on the server</x-forms.button>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<div class="flex gap-2 ">
|
<div class="flex gap-2 ">
|
||||||
Available for using:
|
Available for using:
|
||||||
@forelse ($server->standaloneDockers as $docker)
|
@forelse ($server->standaloneDockers as $docker)
|
||||||
<a href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
<a wire:navigate href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
||||||
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
|
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
|
||||||
</a>
|
</a>
|
||||||
@empty
|
@empty
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<div class="flex flex-wrap gap-2 ">
|
<div class="flex flex-wrap gap-2 ">
|
||||||
@foreach ($networks as $network)
|
@foreach ($networks as $network)
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a wire:navigate
|
||||||
href="{{ route('destination.new', ['server_id' => $server->id, 'network_name' => data_get($network, 'Name')]) }}">
|
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>+<x-highlighted text="{{ data_get($network, 'Name') }}" />
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
|
@ -230,7 +230,16 @@
|
|||||||
<li class="step step-secondary">Select a Server</li>
|
<li class="step step-secondary">Select a Server</li>
|
||||||
<li class="step step-secondary">Select a Destination</li>
|
<li class="step step-secondary">Select a Destination</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<a wire:navigate href="{{ route('destination.new', ['server_id' => $server_id]) }}"
|
||||||
|
class="items-center justify-center pb-10 text-center box-without-bg group bg-coollabs hover:bg-coollabs-100">
|
||||||
|
<div class="flex flex-col mx-6 ">
|
||||||
|
<div class="font-bold text-white">
|
||||||
|
+ Add New
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
<div class="flex flex-col justify-center gap-2 text-left xl:flex-row xl:flex-wrap">
|
<div class="flex flex-col justify-center gap-2 text-left xl:flex-row xl:flex-wrap">
|
||||||
|
|
||||||
@foreach ($standaloneDockers as $standaloneDocker)
|
@foreach ($standaloneDockers as $standaloneDocker)
|
||||||
<div class="box group" wire:click="setDestination('{{ $standaloneDocker->uuid }}')">
|
<div class="box group" wire:click="setDestination('{{ $standaloneDocker->uuid }}')">
|
||||||
<div class="flex flex-col mx-6">
|
<div class="flex flex-col mx-6">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user