wip: migrate to livewire 3
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div>
|
||||
<h3>Additional Servers</h3>
|
||||
@foreach ($servers as $server)
|
||||
<form wire:submit.prevent='submit' class="p-2 border border-coolgray-400">
|
||||
<form wire:submit='submit' class="p-2 border border-coolgray-400">
|
||||
<h4>{{ $server->name }}</h4>
|
||||
<div class="text-sm text-coolgray-600">{{ $server->description }}</div>
|
||||
<x-forms.checkbox id="additionalServers.{{ $loop->index }}.enabled" label="Enabled">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<dialog id="newVariable" class="modal">
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='submit'>
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit='submit'>
|
||||
<h3 class="text-lg font-bold">Add Environment Variable</h3>
|
||||
<x-forms.input placeholder="NODE_ENV" id="key" label="Name" required />
|
||||
<x-forms.input placeholder="production" id="value" label="Value" required />
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
@endforeach
|
||||
@endif
|
||||
@else
|
||||
<form wire:submit.prevent='saveVariables(false)' class="flex flex-col gap-2">
|
||||
<form wire:submit='saveVariables(false)' class="flex flex-col gap-2">
|
||||
<x-forms.textarea rows=25 class="whitespace-pre-wrap" id="variables"></x-forms.textarea>
|
||||
<x-forms.button type="submit" class="btn btn-primary">Save</x-forms.button>
|
||||
</form>
|
||||
@if ($showPreview)
|
||||
<form wire:submit.prevent='saveVariables(true)' class="flex flex-col gap-2">
|
||||
<form wire:submit='saveVariables(true)' class="flex flex-col gap-2">
|
||||
<x-forms.textarea rows=25 class="whitespace-pre-wrap" label="Preview Environment Variables"
|
||||
id="variablesPreview"></x-forms.textarea>
|
||||
<x-forms.button type="submit" class="btn btn-primary">Save</x-forms.button>
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
class="font-bold text-warning">({{ $env->key }})</span>?</p>
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 p-4 m-2 border lg:items-center border-coolgray-300 lg:m-0 lg:p-0 lg:border-0 lg:flex-row">
|
||||
<form wire:submit='submit'
|
||||
class="flex flex-col gap-2 p-4 m-2 border lg:items-center border-coolgray-300 lg:m-0 lg:p-0 lg:border-0 lg:flex-row">
|
||||
@if ($isLocked)
|
||||
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
@if ($type === 'application')
|
||||
<h1>Execute Command</h1>
|
||||
<livewire:project.application.heading :application="$resource" />
|
||||
<h2 class="pt-4">Command Details</h2>
|
||||
<div class="pb-2">Run any one-shot command inside a container.</div>
|
||||
@elseif ($type === 'database')
|
||||
<h1>Execute Command</h1>
|
||||
<livewire:project.database.heading :database="$resource" />
|
||||
@@ -9,7 +11,7 @@
|
||||
<h2>Execute Command</h2>
|
||||
@endif
|
||||
@if (count($containers) > 0)
|
||||
<form class="flex flex-col gap-2 pt-4" wire:submit.prevent='runCommand'>
|
||||
<form class="flex flex-col gap-2 pt-4" wire:submit='runCommand'>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="ls -l" autofocus id="command" label="Command" required />
|
||||
<x-forms.input id="workDir" label="Working directory" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div x-init="$wire.getLogs">
|
||||
<div class="flex gap-2">
|
||||
<h4>Container: {{$container}}</h4>
|
||||
<h4>Container: {{ $container }}</h4>
|
||||
@if ($streamLogs)
|
||||
<span wire:poll.2000ms='getLogs(true)' class="loading loading-xs text-warning loading-spinner"></span>
|
||||
@endif
|
||||
@@ -9,7 +9,7 @@
|
||||
<x-forms.checkbox instantSave label="Stream Logs" id="streamLogs"></x-forms.checkbox>
|
||||
<x-forms.checkbox instantSave label="Include Timestamps" id="showTimeStamps"></x-forms.checkbox>
|
||||
</div>
|
||||
<form wire:submit.prevent='getLogs(true)' class="flex items-end gap-2">
|
||||
<form wire:submit='getLogs(true)' class="flex items-end gap-2">
|
||||
<x-forms.input label="Only Show Number of Lines" placeholder="1000" required id="numberOfLines"></x-forms.input>
|
||||
<x-forms.button type="submit">Refresh</x-forms.button>
|
||||
</form>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Healthchecks</h2>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<x-layout>
|
||||
<div>
|
||||
@if ($type === 'application')
|
||||
<h1>Logs</h1>
|
||||
<livewire:project.application.heading :application="$resource" />
|
||||
@@ -28,8 +28,9 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex-1 pl-8">
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$resource" :servicesubtype="$serviceSubType" :container="$container" />
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$resource" :servicesubtype="$serviceSubType"
|
||||
:container="$container" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</x-layout>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex items-center gap-2 ">
|
||||
<h2>Resource Limits</h2>
|
||||
<x-forms.button type='submit'>Save</x-forms.button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<dialog id="newStorage" class="modal">
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='submit'>
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit='submit'>
|
||||
<h3 class="text-lg font-bold">Add Storage Volume</h3>
|
||||
<x-forms.input placeholder="pv-name" id="name" label="Name" required />
|
||||
<x-forms.input placeholder="/root" id="host_path" label="Source Path" />
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="flex flex-col gap-4">
|
||||
@foreach ($resource->persistentStorages as $storage)
|
||||
@if ($resource->type() === 'service')
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" :isFirst="$loop->first"
|
||||
isReadOnly='true' />
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage"
|
||||
:isFirst="$loop->first" isReadOnly='true' />
|
||||
@else
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
|
||||
@endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||
<form wire:submit='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||
@if ($isReadOnly)
|
||||
@if ($isFirst)
|
||||
<x-forms.input id="storage.name" label="Volume Name" required readonly />
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div>
|
||||
<h3>Manual Git Webhooks</h3>
|
||||
@if ($githubManualWebhook && $gitlabManualWebhook)
|
||||
<form wire:submit.prevent='saveSecret' class="flex flex-col gap-2">
|
||||
<form wire:submit='saveSecret' class="flex flex-col gap-2">
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input helper="Content Type in GitHub configuration could be json or form-urlencoded."
|
||||
readonly label="GitHub" id="githubManualWebhook"></x-forms.input>
|
||||
|
||||
Reference in New Issue
Block a user