lasthourcloud/resources/views/livewire/project/application/deployment-logs.blade.php

33 lines
1.8 KiB
PHP
Raw Normal View History

2023-06-02 10:34:45 +00:00
<div class="pt-4">
2023-06-30 13:57:40 +00:00
<livewire:project.application.deployment-navbar :application_deployment_queue="$application_deployment_queue" />
@if (data_get($application_deployment_queue, 'status') === 'in_progress')
2023-06-16 10:35:40 +00:00
<div class="flex items-center gap-1 pt-2 ">Deployment is
2023-06-30 13:57:40 +00:00
<div class="text-warning"> {{ Str::headline(data_get($this->application_deployment_queue, 'status')) }}.
</div>
2023-06-05 10:07:55 +00:00
<x-loading class="loading-ring" />
2023-05-31 12:42:37 +00:00
</div>
2023-06-16 10:35:40 +00:00
<div class="">Logs will be updated automatically.</div>
2023-05-31 12:42:37 +00:00
@else
2023-06-16 10:35:40 +00:00
<div class="pt-2 ">Deployment is <span
2023-06-30 13:57:40 +00:00
class="text-warning">{{ Str::headline(data_get($application_deployment_queue, 'status')) }}</span>.
2023-06-05 10:07:55 +00:00
</div>
2023-05-31 10:38:36 +00:00
@endif
2023-06-30 13:57:40 +00:00
<div @if ($isKeepAliveOn) wire:poll.2000ms="polling" @endif
class="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-dotted rounded border-coolgray-400 max-h-[32rem] p-2 px-4 mt-4 text-xs">
<span class="flex flex-col">
@if (decode_remote_command_output($application_deployment_queue)->count() > 0)
@foreach (decode_remote_command_output($application_deployment_queue) as $line)
2023-06-30 19:22:14 +00:00
<div @class([
'font-mono break-all whitespace-pre-wrap',
2023-06-30 13:57:40 +00:00
'text-neutral-400' => $line['type'] == 'stdout',
'text-error' => $line['type'] == 'stderr',
2023-06-30 19:22:14 +00:00
'text-warning' => $line['hidden'],
])>[{{ $line['timestamp'] }}] @if ($line['hidden'])<br>Command: {{ $line['command'] }} <br>Output: @endif{{ $line['output'] }}@if ($line['hidden']) @endif</div>
2023-06-30 13:57:40 +00:00
@endforeach
@else
<span class="font-mono text-neutral-400">No logs yet.</span>
@endif
</span>
2023-05-31 10:38:36 +00:00
</div>
</div>