This commit is contained in:
Andras Bacsai 2023-05-22 12:09:24 +02:00
parent e00ccf65cf
commit f5bf07a7c3
4 changed files with 25 additions and 20 deletions

View File

@ -1,4 +1,3 @@
<x-layout>
<h1>New Destination</h1>
<livewire:destination.new.standalone-docker :servers="$servers" :server_id="$server_id" />
</x-layout>

View File

@ -1,5 +1,11 @@
<div>
<form class="flex items-end gap-4" wire:submit.prevent='submit'>
<form class="flex flex-col gap-4" wire:submit.prevent='submit'>
<div class="flex gap-2">
<h1>New Destination</h1>
<x-inputs.button type="submit">
Save
</x-inputs.button>
</div>
<x-inputs.input id="name" label="Name" required />
<x-inputs.input id="network" label="Network" required />
<x-inputs.select id="server_id" label="Select a server" required>
@ -8,8 +14,6 @@
<option value="{{ $server->id }}">{{ $server->name }}</option>
@endforeach
</x-inputs.select>
<x-inputs.button type="submit">
Submit
</x-inputs.button>
</form>
</div>

View File

@ -1,13 +1,19 @@
<div x-data="{ deleteServer: false }">
<h2>General</h2>
<x-naked-modal show="deleteServer" message='Are you sure you would like to delete this server?' />
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex gap-2">
<h2>General</h2>
<x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteServer = true">
Delete
</x-inputs.button>
</div>
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
<x-inputs.input id="server.name" label="Name" required />
<x-inputs.input id="server.description" label="Description" />
<x-inputs.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
label="Is it part of a Swarm cluster?" />
{{-- <x-inputs.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
label="Is it part of a Swarm cluster?" /> --}}
</div>
<div class="flex flex-col w-96">
@if ($server->id === 0)
@ -23,9 +29,7 @@
</div>
<div class="flex items-center gap-2">
<x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button wire:click.prevent='validateServer'>
<x-inputs.button isHighlighted wire:click.prevent='validateServer'>
@if ($server->settings->is_validated)
Check Connection
@else
@ -34,9 +38,7 @@
</x-inputs.button>
{{-- <x-inputs.button wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}}
<x-inputs.button x-on:click.prevent="deleteServer = true">
Delete
</x-inputs.button>
</div>
<div class="pt-3">
@isset($uptime)

View File

@ -8,21 +8,22 @@
</div>
@if ($server->extra_attributes->proxy_type)
<h3>Actions</h3>
<div wire:poll="proxyStatus">
@if (
$server->extra_attributes->last_applied_proxy_settings &&
$server->extra_attributes->last_saved_proxy_settings !== $server->extra_attributes->last_applied_proxy_settings)
<div class="text-red-500">Configuration out of sync.</div>
<x-inputs.button wire:click="installProxy">
<x-inputs.button isHighlighted wire:click="installProxy">
Reconfigure
</x-inputs.button>
@endif
@if ($server->extra_attributes->proxy_status !== 'running')
<x-inputs.button wire:click="installProxy">
<x-inputs.button isHighlighted wire:click="installProxy">
Start
</x-inputs.button>
@else
<x-inputs.button x-on:click.prevent="stopProxy = true">Stop
<x-inputs.button isWarning x-on:click.prevent="stopProxy = true">Stop
</x-inputs.button>
@endif
<div class="py-4">
@ -33,10 +34,10 @@
<x-loading />
</div>
@isset($proxy_settings)
<h3>Configuration</h3>
@if ($selectedProxy->value === 'TRAEFIK_V2')
<form wire:submit.prevent='saveConfiguration'>
<div class="py-2 pb-8">
<div class="flex items-center gap-2">
<h3>Configuration</h3>
<x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button wire:click.prevent="resetProxy">
Reset Configuration
@ -61,5 +62,4 @@
@else
<p>Server is not validated. Validate first.</p>
@endif
</div>