destinations
This commit is contained in:
@@ -8,9 +8,13 @@ body {
|
||||
a, a:visited {
|
||||
@apply text-neutral-300 hover:text-purple-500;
|
||||
}
|
||||
input, select, textarea {
|
||||
@apply border-none p-2 bg-neutral-800 text-white disabled:text-neutral-600;
|
||||
input, textarea {
|
||||
@apply border-none p-2 bg-neutral-800 text-white disabled:text-neutral-600 read-only:text-neutral-600 read-only:select-none
|
||||
}
|
||||
select {
|
||||
@apply border-none p-2 bg-neutral-800 text-white disabled:text-neutral-600 read-only:select-none
|
||||
}
|
||||
|
||||
button {
|
||||
@apply border-none px-2 p-1 cursor-pointer;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@props([
|
||||
'isWarning' => null,
|
||||
'defaultClass' => 'text-white bg-neutral-800 hover:bg-violet-600',
|
||||
'defaultWarningClass' => 'text-white bg-red-500 hover:bg-red-600',
|
||||
'defaultClass' => 'text-white bg-neutral-800 hover:bg-violet-600 w-28',
|
||||
'defaultWarningClass' => 'text-white bg-red-500 hover:bg-red-600 w-28',
|
||||
'loadingClass' => 'text-black bg-green-500',
|
||||
'confirm' => null,
|
||||
'confirmAction' => null,
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
'id' => null,
|
||||
'type' => 'text',
|
||||
'required' => false,
|
||||
'readonly' => false,
|
||||
'label' => null,
|
||||
'instantSave' => false,
|
||||
'disabled' => false,
|
||||
|
||||
25
resources/views/components/inputs/select.blade.php
Normal file
25
resources/views/components/inputs/select.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@props([
|
||||
'id' => null,
|
||||
'label' => null,
|
||||
'required' => false,
|
||||
])
|
||||
|
||||
<span @class(['flex flex-col'])>
|
||||
<label for={{ $id }}>
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
@else
|
||||
{{ $id }}
|
||||
@endif
|
||||
@if ($required)
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
<select {{ $attributes }} wire:model.defer={{ $id }}>
|
||||
{{ $slot }}
|
||||
</select>
|
||||
|
||||
@error($id)
|
||||
<div class="text-red-500">{{ $message }}</div>
|
||||
@enderror
|
||||
</span>
|
||||
@@ -1,11 +1,4 @@
|
||||
<x-layout>
|
||||
<h1>Destination</h1>
|
||||
<p>Name: {{ data_get($destination, 'name') }}</p>
|
||||
<p>Server:{{ data_get($destination, 'server.ip') }}:{{ data_get($destination, 'server.port') }} </p>
|
||||
@if ($destination->getMorphClass() === 'App\Models\StandaloneDocker')
|
||||
<p>Network: {{ data_get($destination, 'network') }}</p>
|
||||
@endif
|
||||
@if ($destination->getMorphClass() === 'App\Models\SwarmDocker')
|
||||
<p>Uuid: {{ data_get($destination, 'uuid') }}</p>
|
||||
@endif
|
||||
<livewire:destination.form :destination_uuid="$destination_uuid" />
|
||||
</x-layout>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<div>
|
||||
<x-inputs.button wire:click='checkUpdate' type="submit">Check for updates</x-inputs.button>
|
||||
<x-inputs.button class="w-32 text-white bg-neutral-800 hover:bg-violet-600" wire:click='checkUpdate' type="submit">
|
||||
Check for updates</x-inputs.button>
|
||||
@if ($updateAvailable)
|
||||
Update available
|
||||
@endif
|
||||
|
||||
18
resources/views/livewire/destination/form.blade.php
Normal file
18
resources/views/livewire/destination/form.blade.php
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<div>
|
||||
<p>IP: {{ $destination->server->ip }}</p>
|
||||
<p>Description: {{ $destination->server->description }}</p>
|
||||
<p>Server Name: {{ data_get($destination, 'server.name') }}</p>
|
||||
@if (data_get($destination, 'server.description'))
|
||||
<p>Description: {{ data_get($destination, 'server.description') }}</p>
|
||||
@endif
|
||||
<p>Docker Network: {{ $destination->network }}</p>
|
||||
</div>
|
||||
|
||||
@@ -15,18 +15,16 @@
|
||||
@endif
|
||||
</div>
|
||||
<div class="flex flex-col w-96">
|
||||
|
||||
<x-inputs.input id="application.base_directory" label="Base Directory" />
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" required />
|
||||
@else
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" />
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="flex flex-col w-96">
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" disabled />
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
@else
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" required />
|
||||
@endif
|
||||
@@ -34,7 +32,7 @@
|
||||
<x-inputs.input id="application.ports_mappings" label="Ports Mappings" />
|
||||
</div>
|
||||
</div>
|
||||
<x-inputs.button class="flex mx-auto mt-4" type="submit">
|
||||
<x-inputs.button class="mx-auto mt-4 text-white bg-neutral-800 hover:bg-violet-600" type="submit">
|
||||
Submit
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<p>HostPath:{{ data_get($storage, 'host_path') }}</p>
|
||||
<p>ContainerId:{{ data_get($storage, 'container_id') }}</p>
|
||||
@empty
|
||||
<p>No storage found.</p>
|
||||
<p>There are no storages added for this application.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
@if ($is_static)
|
||||
<x-inputs.input id="publish_directory" label="Publish Directory" />
|
||||
@else
|
||||
<x-inputs.input type="number" id="port" label="Port" :disabled="$is_static" />
|
||||
<x-inputs.input type="number" id="port" label="Port" :readonly="$is_static" />
|
||||
@endif
|
||||
<x-inputs.button type="submit">
|
||||
Submit
|
||||
|
||||
Reference in New Issue
Block a user