This commit is contained in:
Andras Bacsai
2023-05-16 11:02:51 +02:00
parent 57c64d0b86
commit 752c86d8f7
16 changed files with 165 additions and 92 deletions

View File

@@ -7,8 +7,8 @@
<x-inputs.input id="destination.network" label="Docker Network" readonly />
@endif
<div>
<x-inputs.button>
Submit
<x-inputs.button isBold type="submit">
Save
</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteDestination = true">
Delete

View File

@@ -4,10 +4,11 @@
<x-inputs.input id="network" label="Network" required />
<x-inputs.select id="server_id" label="Select a server" required>
@foreach ($servers as $server)
<option disabled>Select a server</option>
<option value="{{ $server->id }}">{{ $server->name }}</option>
@endforeach
</x-inputs.select>
<x-inputs.button type="submit">
<x-inputs.button isBold type="submit">
Submit
</x-inputs.button>
</form>

View File

@@ -1,14 +1,16 @@
<div x-data="{ deletePrivateKey: false }">
<x-naked-modal show="deletePrivateKey" message='Are you sure you would like to delete this private key?' />
<form class="flex flex-col gap-2 w-96" wire:submit.prevent='changePrivateKey'>
<form class="flex flex-col gap-2" wire:submit.prevent='changePrivateKey'>
<x-inputs.input id="private_key.name" label="Name" required />
<x-inputs.input id="private_key.description" label="Description" />
<x-inputs.input type="textarea" id="private_key.private_key" label="Private Key" required />
<x-inputs.button type="submit">
Submit
</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deletePrivateKey = true">
Delete
</x-inputs.button>
<x-inputs.input type="textarea" rows="10" id="private_key.private_key" label="Private Key" required />
<div>
<x-inputs.button isBold type="submit">
Save
</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deletePrivateKey = true">
Delete
</x-inputs.button>
</div>
</form>
</div>

View File

@@ -1,27 +1,12 @@
<div x-data="{ deleteServer: false }">
<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 flex-col pb-4">
<div class="flex items-center gap-2">
<div class="text-3xl font-bold">Server</div>
<x-inputs.button isBold type="submit">Submit</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteServer = true">
Delete
</x-inputs.button>
</div>
<div>
@if ($server->settings->is_validated)
<div class="text-green-400/90">Validated</div>
@else
<div class="text-red-400/90">Not validated</div>
@endif
</div>
</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.input 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)
@@ -35,19 +20,34 @@
@endif
</div>
</div>
<div class="flex gap-2">
<x-inputs.button isBold wire:click.prevent='validateServer'>Validate Server</x-inputs.button>
<x-inputs.button isBold wire:click.prevent='installDocker'>Install Docker</x-inputs.button>
<div class="flex items-center gap-2">
<x-inputs.button isBold type="submit">Save</x-inputs.button>
<x-inputs.button isBold wire:click.prevent='validateServer'>
@if ($server->settings->is_validated)
Check Connection
@else
Validate Server
@endif
</x-inputs.button>
{{-- <x-inputs.button isBold wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}}
<x-inputs.button isWarning x-on:click.prevent="deleteServer = true">
Delete
</x-inputs.button>
</div>
<div class="pt-3">
@isset($uptime)
<p>Connection: OK</p>
<p>Uptime: {{ $uptime }}</p>
@endisset
@isset($dockerVersion)
<p>Docker Engine {{ $dockerVersion }}</p>
@endisset
@isset($dockerComposeVersion)
<p>{{ $dockerComposeVersion }}</p>
@endisset
</div>
</form>
@isset($uptime)
<p>Uptime: {{ $uptime }}</p>
@endisset
@isset($dockerVersion)
<p>Docker Engine: {{ $dockerVersion }}</p>
@endisset
@isset($dockerComposeVersion)
<p>Docker Compose: {{ $dockerComposeVersion }}</p>
@endisset
</div>

View File

@@ -7,7 +7,7 @@
<x-inputs.input id="user" label="User" />
<x-inputs.input type="number" id="port" label="Port" />
<label>Private Key</label>
<select wire:model.defer="private_key_id">
<x-inputs.select wire:model.defer="private_key_id">
<option disabled>Select a private key</option>
@foreach ($private_keys as $key)
@if ($loop->first)
@@ -16,7 +16,9 @@
<option value="{{ $key->id }}">{{ $key->name }}</option>
@endif
@endforeach
</select>
</x-inputs.select>
<x-inputs.input instantSave noDirty type="checkbox" id="is_part_of_swarm"
label="Is it part of a Swarm cluster?" />
<x-inputs.button isBold type="submit">
Save
</x-inputs.button>

View File

@@ -1,9 +1,8 @@
<div x-data="{ deleteSource: false }">
<x-naked-modal show="deleteSource" message='Are you sure you would like to delete this source?' />
<h3>Change Github App</h3>
<form wire:submit.prevent='submit'>
<x-inputs.input id="github_app.name" label="App Name" required />
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" />
@if ($github_app->app_id)
<x-inputs.input id="github_app.organization" label="Organization" disabled
placeholder="Personal user if empty" />
@@ -14,19 +13,24 @@
<x-inputs.input id="github_app.html_url" label="HTML Url" disabled />
<x-inputs.input id="github_app.custom_user" label="User" required />
<x-inputs.input type="number" id="github_app.custom_port" label="Port" required />
@if ($github_app->app_id)
<x-inputs.input type="number" id="github_app.app_id" label="App Id" disabled />
<x-inputs.input type="number" id="github_app.installation_id" label="Installation Id" disabled />
<x-inputs.input id="github_app.client_id" label="Client Id" type="password" disabled />
<x-inputs.input id="github_app.client_secret" label="Client Secret" type="password" disabled />
<x-inputs.input id="github_app.webhook_secret" label="Webhook Secret" type="password" disabled />
<x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
Delete
</x-inputs.button>
@else
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" />
<div class="py-2">
<x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button isBold type="submit">Save</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
Delete
</x-inputs.button>
</div>
@else
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" />
<div class="py-2">
<x-inputs.button isBold type="submit">Save</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
Delete
</x-inputs.button>