This commit is contained in:
Andras Bacsai
2023-05-22 22:30:33 +02:00
parent a044354294
commit c023fdae8b
30 changed files with 251 additions and 243 deletions

View File

@@ -1,5 +1,5 @@
<div x-data="{ deleteApplication: false }">
<h2>Danger Zone</h2>
<x-naked-modal show="deleteApplication" />
<x-inputs.button isWarning x-on:click.prevent="deleteApplication = true">Delete this application</x-inputs.button>
<x-inputs.button x-on:click.prevent="deleteApplication = true">Delete this application</x-inputs.button>
</div>

View File

@@ -2,7 +2,7 @@
@if ($application->status === 'running')
<div class="dropdown dropdown-bottom">
<button tabindex="0"
class="flex items-center justify-center h-full text-white normal-case rounded bg-primary btn btn-xs hover:bg-primary no-animation">
class="flex items-center justify-center h-full text-white normal-case rounded-none bg-primary btn btn-xs hover:bg-primary no-animation">
Actions
<x-chevron-down />
</button>
@@ -16,11 +16,10 @@
</li>
</ul>
</div>
running
@else
<div class="dropdown dropdown-bottom">
<button tabindex="0"
class="flex items-center justify-center h-full text-white normal-case rounded bg-primary btn btn-xs hover:bg-primary no-animation">
class="flex items-center justify-center h-full text-white normal-case rounded-none bg-primary btn btn-xs hover:bg-primary no-animation">
Actions
<x-chevron-down />
</button>
@@ -34,15 +33,5 @@
</li>
</ul>
</div>
stopped
@endif
<span wire:poll.5000ms='pollingStatus'>
{{-- @if ($application->status === 'running')
<span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span>
<span class="text-green-500" wire:loading.remove.delay.longer>{{ $application->status }}</span>
@else
<span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span>
<span class="text-red-500" wire:loading.remove.delay.longer>{{ $application->status }}</span>
@endif --}}
</span>
</div>

View File

@@ -1,4 +1,4 @@
<form wire:submit.prevent='submit' class="flex flex-col px-2 max-w-fit">
<form wire:submit.prevent='submit' class="flex flex-col max-w-fit">
<div class="flex gap-2">
<x-inputs.input placeholder="NODE_ENV" noDirty id="key" label="Name" required />
<x-inputs.input placeholder="production" noDirty id="value" label="Value" required />

View File

@@ -1,5 +1,5 @@
<div x-data="{ deleteEnvironment: false }">
<form wire:submit.prevent='submit' class="flex flex-col px-2 max-w-fit">
<form wire:submit.prevent='submit' class="flex flex-col max-w-fit">
<div class="flex gap-2">
<x-inputs.input label="Name" id="env.key" />
<x-inputs.input label="Value" id="env.value" />

View File

@@ -1,4 +1,4 @@
<div
class="flex flex-col-reverse w-full overflow-y-auto border border-solid rounded border-coolgray-300 max-h-[32rem] p-4 text-xs text-white">
class="flex flex-col-reverse w-full overflow-y-auto border border-solid rounded border-coolgray-300 max-h-[32rem] p-4 mt-4 text-xs text-white">
<pre class="font-mono whitespace-pre-wrap" @if ($isKeepAliveOn) wire:poll.1000ms="polling" @endif>{{ \App\Actions\CoolifyTask\RunRemoteProcess::decodeOutput($activity) }}</pre>
</div>

View File

@@ -0,0 +1,15 @@
<div wire:poll.5000ms='pollingStatus'>
@if ($application->status === 'running')
<span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span>
<div class="flex items-center gap-2 text-sm" wire:loading.remove.delay.longer>
<span class="flex w-3 h-3 rounded-full bg-success"></span>
<span class="text-green-500">Running</span>
</div>
@else
<span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span>
<div class="flex items-center gap-2 text-sm" wire:loading.remove.delay.longer>
<span class="flex w-3 h-3 rounded-full bg-error"></span>
<span class="text-error">Stopped</span>
</div>
@endif
</div>