destinations

This commit is contained in:
Andras Bacsai
2023-05-04 10:45:09 +02:00
parent b8b0d2243f
commit 32b7a1ffcd
15 changed files with 115 additions and 44 deletions

View File

@@ -0,0 +1,18 @@
<div>
<form class="flex flex-col gap-4" wire:submit.prevent='submit'>
<x-inputs.input id="destination.name" label="Name" />
<x-inputs.input id="destination.server.ip" label="Server IP" readonly />
@if ($destination->getMorphClass() === 'App\Models\StandaloneDocker')
<x-inputs.input id="destination.network" label="Docker Network" readonly />
@endif
<div>
<x-inputs.button>
Submit
</x-inputs.button>
<x-inputs.button confirm='Are you sure you would like to delete this private key?'
confirmAction="delete('{{ $destination->id }}')">
Delete
</x-inputs.button>
</div>
</form>
</div>

View File

@@ -1,21 +1,14 @@
<div>
<form class="flex flex-col" wire:submit.prevent='submit'>
<form class="flex items-end gap-4" wire:submit.prevent='submit'>
<x-inputs.input id="name" label="Name" required />
<x-inputs.input id="network" label="Network" required />
<x-inputs.input id="server_id" label="Server ID" required />
@foreach ($servers as $key)
@if ($server_id == $key->id)
<x-inputs.button class="bg-green-500" wire:click.prevent="setServerId('{{ $key->id }}')">
{{ $key->name }}
</x-inputs.button>
@else
<x-inputs.button wire:click.prevent="setServerId('{{ $key->id }}')">{{ $key->name }}
</x-inputs.button>
@endif
@endforeach
<x-inputs.button class="mt-4" type="submit">
<x-inputs.select id="server_id" label="Select a server" required>
@foreach ($servers as $server)
<option value="{{ $server->id }}">{{ $server->name }}</option>
@endforeach
</x-inputs.select>
<x-inputs.button type="submit">
Submit
</x-inputs.button>
</form>
</div>