Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(ui): update server status display and improve server addition layout

Andras Bacsaibe89205d014f
diff --git a/resources/views/livewire/project/application/configuration.blade.php b/resources/views/livewire/project/application/configuration.blade.php
index 6b015e3fb9..f4cd0afd07 100644
--- a/resources/views/livewire/project/application/configuration.blade.php
+++ b/resources/views/livewire/project/application/configuration.blade.php
@@ -37,8 +37,7 @@
d="M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16" />
</svg>
</span>
- @endif
- @if ($application->server_status == false)
+ @elseif ($application->server_status == false)
<span title="The underlying server(s) has problems.">
<svg class="w-4 h-4 text-error" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor"
diff --git a/resources/views/livewire/project/shared/destination.blade.php b/resources/views/livewire/project/shared/destination.blade.php
index c6a3e23702..97e978e7a5 100644
--- a/resources/views/livewire/project/shared/destination.blade.php
+++ b/resources/views/livewire/project/shared/destination.blade.php
@@ -5,7 +5,7 @@
<div class="flex flex-col gap-2">
<h3>Primary Server</h3>
<div
- class="relative flex flex-col bg-white border cursor-default dark:text-white box-without-bg dark:bg-coolgray-100 w-96 dark:border-black">
+ class="relative flex flex-col bg-white border cursor-default dark:text-white box-without-bg dark:bg-coolgray-100 dark:border-black">
@if (str($resource->realStatus())->startsWith('running'))
<div title="{{ $resource->realStatus() }}" class="absolute bg-success -top-1 -left-1 badge ">
</div>
@@ -35,7 +35,8 @@
<h3>Additional Server(s)</h3>
@foreach ($resource->additional_networks as $destination)
<div class="flex flex-col gap-2" wire:key="destination-{{ $destination->id }}">
- <div class="relative flex flex-col w-full box">
+ <div
+ class="relative flex flex-col bg-white border cursor-default dark:text-white box-without-bg dark:bg-coolgray-100 dark:border-black">
@if (str(data_get($destination, 'pivot.status'))->startsWith('running'))
<div title="{{ data_get($destination, 'pivot.status') }}"
class="absolute bg-success -top-1 -left-1 badge "></div>
@@ -75,25 +76,27 @@
@endif
</div>
@if ($resource->getMorphClass() === 'App\Models\Application' && data_get($resource, 'build_pack') !== 'dockercompose')
- @if (count($networks) > 0)
- <h4>Choose another server</h4>
- <div class="grid grid-cols-1 gap-4">
- @foreach ($networks as $network)
- <div wire:click="addServer('{{ $network->id }}','{{ data_get($network, 'server.id') }}')"
- class="relative flex flex-col cursor-default dark:text-white box w-96 group">
- <div>
- <div class="box-title">
- Server: {{ data_get($network, 'server.name') }}
- </div>
- <div class="box-description">
- Network: {{ data_get($network, 'name') }}
+ <div class="flex flex-col gap-2">
+ @if (count($networks) > 0)
+ <h3>Add another server</h3>
+ <div class="grid grid-cols-1 gap-4">
+ @foreach ($networks as $network)
+ <div wire:click="addServer('{{ $network->id }}','{{ data_get($network, 'server.id') }}')"
+ class="relative flex flex-col dark:text-white box group">
+ <div>
+ <div class="box-title">
+ Server: {{ data_get($network, 'server.name') }}
+ </div>
+ <div class="box-description">
+ Network: {{ data_get($network, 'name') }}
+ </div>
</div>
</div>
- </div>
- @endforeach
- </div>
- @else
- <div>No additional servers available to attach.</div>
- @endif
+ @endforeach
+ </div>
+ @else
+ <div>No additional servers available to attach.</div>
+ @endif
+ </div>
@endif
</div>