fix: multiple server deployments

feat: custom preview deployment fqdn
ui: improvements here and there
This commit is contained in:
Andras Bacsai
2024-05-30 12:28:29 +02:00
parent 07e801f44d
commit 68d3cea528
14 changed files with 314 additions and 151 deletions

View File

@@ -31,7 +31,7 @@
</div>
@endif
</div>
@if ($resource?->additional_networks?->count() > 0)
@if ($resource?->additional_networks?->count() > 0 && data_get($resource, 'build_pack') !== 'dockercompose')
<h3>Additional Server(s)</h3>
@foreach ($resource->additional_networks as $destination)
<div class="flex flex-col gap-2">
@@ -73,7 +73,7 @@
@endforeach
@endif
</div>
@if ($resource->getMorphClass() === 'App\Models\Application')
@if ($resource->getMorphClass() === 'App\Models\Application' && data_get($resource, 'build_pack') !== 'dockercompose')
@if (count($networks) > 0)
<h4>Choose another server</h4>
<div class="pb-4 description">(experimental) </div>

View File

@@ -1,4 +1,4 @@
<div>
<div class="p-4 my-4 border dark:border-coolgray-200">
<div x-init="$wire.getLogs" id="screen" x-data="{
fullscreen: false,
alwaysScroll: false,
@@ -33,13 +33,12 @@
screen.scrollTop = 0;
}
}">
<div class="flex items-center gap-2">
<div class="flex items-center gap-2 ">
@if ($resource?->type() === 'application')
<h3>{{ $container }}</h3>
<h4>{{ $container }}</h4>
@else
<h3>{{ str($container)->beforeLast('-')->headline() }}</h3>
@endif
<div>Server: {{ $server->name }} </div>
@if ($pull_request)
<div>({{ $pull_request }})</div>
@endif

View File

@@ -4,18 +4,21 @@
<h1>Logs</h1>
<livewire:project.application.heading :application="$resource" />
<div class="pt-4">
<h2 class="pb-4">Logs</h2>
<h2>Logs</h2>
<div class="subtitle">Here you can see the logs of the application.</div>
<div class="pt-2" wire:loading wire:target="loadContainers">
Loading containers...
</div>
@forelse ($servers as $server)
<h3 x-init="$wire.loadContainers({{ $server->id }})"></h3>
<div wire:loading.remove wire:target="loadContainers">
@forelse (data_get($server,'containers',[]) as $container)
<livewire:project.shared.get-logs :server="$server" :resource="$resource" :container="data_get($container, 'Names')" />
@empty
<div class="pt-2">No containers are not running on server: {{ $server->name }}</div>
@endforelse
<div class="py-2">
<h2 wire:loading.remove x-init="$wire.loadContainers({{ $server->id }})">Server: {{ $server->name }}</h2>
<div wire:loading.remove wire:target="loadContainers">
@forelse (data_get($server,'containers',[]) as $container)
<livewire:project.shared.get-logs :server="$server" :resource="$resource" :container="data_get($container, 'Names')" />
@empty
<div class="pt-2">No containers are not running on server: {{ $server->name }}</div>
@endforelse
</div>
</div>
@empty
<div>No functional server found for the application.</div>