fix: complex container status

feat: able to change primary server
feat: links inside the logs
This commit is contained in:
Andras Bacsai
2024-02-22 10:57:05 +01:00
parent 6a00d8c88c
commit 5179129a6b
15 changed files with 115 additions and 49 deletions

View File

@@ -12,5 +12,4 @@
data_get($application_deployment_queue, 'status') === 'queued')
<x-forms.button isError wire:click.prevent="cancel">Cancel</x-forms.button>
@endif
</div>

View File

@@ -51,12 +51,17 @@
@if (decode_remote_command_output($application_deployment_queue)->count() > 0)
@foreach (decode_remote_command_output($application_deployment_queue) as $line)
<div @class([
'font-mono whitespace-pre-line',
'font-mono',
'text-warning' => $line['hidden'],
'text-red-500' => $line['type'] == 'stderr',
])>[{{ $line['timestamp'] }}] @if ($line['hidden'])
<br>COMMAND: <br>{{ $line['command'] }} <br><br>OUTPUT:
@endif{{ $line['output'] }}@if ($line['hidden'])
@endif @if (str($line['output'])->contains('http://') || str($line['output'])->contains('https://'))
@php
$line['output'] = preg_replace('/(https?:\/\/[^\s]+)/', '<a href="$1" target="_blank" class="underline text-neutral-400">$1</a>', $line['output']);
@endphp {!! $line['output'] !!}
@else
{{ $line['output'] }}
@endif
</div>
@endforeach

View File

@@ -1,4 +1,4 @@
<nav wire:poll.30000ms="check_status">
<nav wire:poll.5000ms="check_status">
<x-resources.breadcrumbs :resource="$application" :parameters="$parameters" />
<div class="navbar-main">
<a class="{{ request()->routeIs('project.application.configuration') ? 'text-white' : '' }}"