2023-11-01 13:06:15 +00:00
|
|
|
<div class="pt-4" x-data="{ fullscreen: false }">
|
2023-08-11 18:19:42 +00:00
|
|
|
<livewire:project.application.deployment-navbar :application_deployment_queue="$application_deployment_queue" />
|
2023-06-30 13:57:40 +00:00
|
|
|
@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-08-11 18:19:42 +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-11-01 13:06:15 +00:00
|
|
|
<div :class="fullscreen ? 'fullscreen' : ''">
|
|
|
|
<div @if ($isKeepAliveOn) wire:poll.2000ms="polling" @endif
|
|
|
|
class="relative flex flex-col-reverse w-full p-2 px-4 mt-4 overflow-y-auto text-xs border border-dotted rounded scrollbar border-coolgray-400"
|
|
|
|
:class="fullscreen ? '' : 'max-h-[32rem]'">
|
2023-11-01 14:39:47 +00:00
|
|
|
<button title="Minimize" x-show="fullscreen" class="fixed top-2 right-2"
|
2023-11-01 13:06:15 +00:00
|
|
|
x-on:click="fullscreen = !fullscreen"><svg class="icon" viewBox="0 0 24 24"
|
|
|
|
xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
|
|
|
stroke-width="2" d="M6 14h4m0 0v4m0-4l-6 6m14-10h-4m0 0V6m0 4l6-6" />
|
|
|
|
</svg></button>
|
2023-11-01 14:39:47 +00:00
|
|
|
<button title="Fullscreen" x-show="!fullscreen" class="absolute top-2 right-8"
|
|
|
|
x-on:click="fullscreen = !fullscreen"><svg class="fixed icon" viewBox="0 0 24 24"
|
2023-11-01 13:06:15 +00:00
|
|
|
xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<g fill="none">
|
|
|
|
<path
|
|
|
|
d="M24 0v24H0V0h24ZM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018Zm.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022Zm-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01l-.184-.092Z" />
|
|
|
|
<path fill="currentColor"
|
|
|
|
d="M9.793 12.793a1 1 0 0 1 1.497 1.32l-.083.094L6.414 19H9a1 1 0 0 1 .117 1.993L9 21H4a1 1 0 0 1-.993-.883L3 20v-5a1 1 0 0 1 1.993-.117L5 15v2.586l4.793-4.793ZM20 3a1 1 0 0 1 .993.883L21 4v5a1 1 0 0 1-1.993.117L19 9V6.414l-4.793 4.793a1 1 0 0 1-1.497-1.32l.083-.094L17.586 5H15a1 1 0 0 1-.117-1.993L15 3h5Z" />
|
|
|
|
</g>
|
|
|
|
</svg></button>
|
|
|
|
<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)
|
|
|
|
<div @class([
|
|
|
|
'font-mono whitespace-pre-line',
|
|
|
|
'text-neutral-400' => $line['type'] == 'stdout',
|
|
|
|
'text-error' => $line['type'] == 'stderr',
|
|
|
|
'text-warning' => $line['hidden'],
|
|
|
|
])>[{{ $line['timestamp'] }}] @if ($line['hidden'])
|
|
|
|
<br>COMMAND: <br>{{ $line['command'] }} <br><br>OUTPUT:
|
|
|
|
@endif{{ $line['output'] }}@if ($line['hidden'])
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
@else
|
|
|
|
<span class="font-mono text-neutral-400">No logs yet.</span>
|
|
|
|
@endif
|
|
|
|
</span>
|
|
|
|
</div>
|
2023-05-31 10:38:36 +00:00
|
|
|
</div>
|
2023-03-28 20:13:08 +00:00
|
|
|
</div>
|