This commit is contained in:
Andras Bacsai
2023-06-07 15:08:35 +02:00
parent 50bac2c056
commit bbcabc8e71
31 changed files with 636 additions and 472 deletions

View File

@@ -9,9 +9,16 @@
Delete
</x-forms.button>
@endif
@if (!$server->settings->is_validated)
<div class="w-full">
<x-forms.button isHighlighted wire:click.prevent='validateServer'>
Validate Server
</x-forms.button>
</div>
@endif
</div>
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
<div class="flex flex-col w-full">
@if ($server->id === 0)
<x-forms.input id="server.name" label="Name" readonly required />
<x-forms.input id="server.description" label="Description" readonly />
@@ -23,7 +30,7 @@
{{-- <x-forms.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">
<div class="flex flex-col w-full">
@if ($server->id === 0)
<x-forms.input id="server.ip" label="IP Address" readonly required />
<x-forms.input id="server.user" label="User" readonly required />
@@ -37,13 +44,7 @@
@endif
</div>
</div>
@if (!$server->settings->is_validated)
<div class="w-full pt-4">
<x-forms.button isHighlighted wire:click.prevent='validateServer'>
Validate Server
</x-forms.button>
</div>
@endif
@if ($server->settings->is_validated)
<h3 class="pt-8 pb-4">Quick Actions</h3>
<div class="flex items-center gap-2">
@@ -53,17 +54,18 @@
{{-- <x-forms.button wire:click.prevent='installDocker'>Install Docker</x-forms.button> --}}
</div>
@endif
<div class="pt-3 text-sm">
@isset($uptime)
@isset($uptime)
<h3>Server Info</h3>
<div class="pt-3 text-sm">
<p>Uptime: {{ $uptime }}</p>
@endisset
@isset($dockerVersion)
<p>Docker Engine {{ $dockerVersion }}</p>
@endisset
@isset($dockerComposeVersion)
<p>{{ $dockerComposeVersion }}</p>
@endisset
</div>
@isset($dockerVersion)
<p>Docker Engine {{ $dockerVersion }}</p>
@endisset
@isset($dockerComposeVersion)
<p>{{ $dockerComposeVersion }}</p>
@endisset
</div>
@endisset
</form>
<div class="flex items-center gap-2 py-4">
<h3>Private Key</h3>

View File

@@ -1,11 +1,6 @@
<div>
<form class="flex flex-col gap-1" wire:submit.prevent='submit'>
<div class="flex items-center gap-2">
<h1>New Server</h1>
<x-forms.button type="submit">
Save
</x-forms.button>
</div>
<h1>New Server</h1>
<x-forms.input id="name" label="Name" required />
<x-forms.input id="description" label="Description" />
<x-forms.input id="ip" label="IP Address" required
@@ -24,6 +19,8 @@
@endforeach
</x-forms.select>
<x-forms.checkbox instantSave noDirty id="is_part_of_swarm" label="Is it part of a Swarm cluster?" />
<x-forms.button type="submit">
Save
</x-forms.button>
</form>
</div>

View File

@@ -1,10 +1,10 @@
<div class="flex flex-wrap gap-2">
<div class="grid grid-cols-2">
@forelse ($private_keys as $private_key)
<div class="w-64 box">
<button wire:click='setPrivateKey({{ $private_key->id }})'>{{ $private_key->name }}
</button>
</div>
<x-forms.button wire:click='setPrivateKey({{ $private_key->id }})'>{{ $private_key->name }}
</x-forms.button>
@empty
<p>No private keys found</p>
<div>No private keys found.
<x-use-magic-bar />
</div>
@endforelse
</div>