2023-12-07 18:06:32 +00:00
|
|
|
<div>
|
2024-06-07 09:01:10 +00:00
|
|
|
<x-slot:title>
|
2026-02-16 01:54:19 +00:00
|
|
|
{{ data_get_str($resource, 'name')->limit(10) }} > Logs | MapleDeploy
|
2024-06-07 09:01:10 +00:00
|
|
|
</x-slot>
|
2024-04-12 10:44:49 +00:00
|
|
|
<livewire:project.shared.configuration-checker :resource="$resource" />
|
2023-10-02 11:38:16 +00:00
|
|
|
@if ($type === 'application')
|
|
|
|
|
<h1>Logs</h1>
|
|
|
|
|
<livewire:project.application.heading :application="$resource" />
|
2025-06-17 12:37:58 +00:00
|
|
|
<div>
|
2025-06-05 11:24:26 +00:00
|
|
|
<h2>Logs</h2>
|
|
|
|
|
@if (str($status)->contains('exited'))
|
2025-06-26 10:23:08 +00:00
|
|
|
<div class="pt-4">The resource is not running.</div>
|
2025-06-05 11:24:26 +00:00
|
|
|
@else
|
|
|
|
|
<div class="pt-2" wire:loading wire:target="loadAllContainers">
|
|
|
|
|
Loading containers...
|
|
|
|
|
</div>
|
|
|
|
|
<div x-init="$wire.loadAllContainers()" wire:loading.remove wire:target="loadAllContainers">
|
|
|
|
|
@forelse ($servers as $server)
|
|
|
|
|
<div class="py-2">
|
2025-12-04 09:57:58 +00:00
|
|
|
<h4>Server: {{ $server->name }}</h4>
|
2025-06-05 11:24:26 +00:00
|
|
|
@if ($server->isFunctional())
|
|
|
|
|
@if (isset($serverContainers[$server->id]) && count($serverContainers[$server->id]) > 0)
|
2025-12-04 09:57:58 +00:00
|
|
|
@php
|
|
|
|
|
$totalContainers = collect($serverContainers)->flatten(1)->count();
|
|
|
|
|
@endphp
|
2025-06-05 11:24:26 +00:00
|
|
|
@foreach ($serverContainers[$server->id] as $container)
|
|
|
|
|
<livewire:project.shared.get-logs
|
|
|
|
|
wire:key="{{ data_get($container, 'ID', uniqid()) }}" :server="$server"
|
2025-12-04 09:57:58 +00:00
|
|
|
:resource="$resource" :container="data_get($container, 'Names')"
|
|
|
|
|
:expandByDefault="$totalContainers === 1" />
|
2025-06-05 11:24:26 +00:00
|
|
|
@endforeach
|
|
|
|
|
@else
|
|
|
|
|
<div class="pt-2">No containers are running on server: {{ $server->name }}</div>
|
|
|
|
|
@endif
|
|
|
|
|
@else
|
|
|
|
|
<div class="pt-2">Server {{ $server->name }} is not functional.</div>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
@empty
|
|
|
|
|
<div>No functional server found for the application.</div>
|
|
|
|
|
@endforelse
|
2024-03-02 13:55:39 +00:00
|
|
|
</div>
|
2025-06-05 11:24:26 +00:00
|
|
|
@endif
|
2023-10-02 11:38:16 +00:00
|
|
|
</div>
|
|
|
|
|
@elseif ($type === 'database')
|
|
|
|
|
<h1>Logs</h1>
|
|
|
|
|
<livewire:project.database.heading :database="$resource" />
|
2025-06-17 12:37:58 +00:00
|
|
|
<div>
|
2025-06-05 11:24:26 +00:00
|
|
|
<h2>Logs</h2>
|
|
|
|
|
@if (str($status)->contains('exited'))
|
2025-06-26 10:23:08 +00:00
|
|
|
<div class="pt-4">The resource is not running.</div>
|
2025-06-05 11:24:26 +00:00
|
|
|
@else
|
|
|
|
|
<div class="pt-2" wire:loading wire:target="loadAllContainers">
|
|
|
|
|
Loading containers...
|
|
|
|
|
</div>
|
|
|
|
|
<div x-init="$wire.loadAllContainers()" wire:loading.remove wire:target="loadAllContainers">
|
|
|
|
|
@forelse ($containers as $container)
|
|
|
|
|
@if (data_get($servers, '0'))
|
|
|
|
|
<livewire:project.shared.get-logs wire:key='{{ $container }}' :server="data_get($servers, '0')"
|
2025-12-04 09:57:58 +00:00
|
|
|
:resource="$resource" :container="$container"
|
|
|
|
|
:expandByDefault="count($containers) === 1" />
|
2025-06-05 11:24:26 +00:00
|
|
|
@else
|
|
|
|
|
<div>No functional server found for the database.</div>
|
|
|
|
|
@endif
|
|
|
|
|
@empty
|
|
|
|
|
<div class="pt-2">No containers are running.</div>
|
|
|
|
|
@endforelse
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
2023-10-02 11:38:16 +00:00
|
|
|
</div>
|
|
|
|
|
@elseif ($type === 'service')
|
2025-05-20 08:30:31 +00:00
|
|
|
<livewire:project.service.heading :service="$resource" :parameters="$parameters" :query="$query" title="Logs" />
|
2025-06-17 12:37:58 +00:00
|
|
|
<div>
|
2025-06-05 11:24:26 +00:00
|
|
|
<h2>Logs</h2>
|
|
|
|
|
@if (str($status)->contains('exited'))
|
2025-06-26 10:23:08 +00:00
|
|
|
<div class="pt-4">The resource is not running.</div>
|
2025-06-05 11:24:26 +00:00
|
|
|
@else
|
|
|
|
|
<div class="pt-2" wire:loading wire:target="loadAllContainers">
|
|
|
|
|
Loading containers...
|
|
|
|
|
</div>
|
|
|
|
|
<div x-init="$wire.loadAllContainers()" wire:loading.remove wire:target="loadAllContainers">
|
|
|
|
|
@forelse ($containers as $container)
|
|
|
|
|
@if (data_get($servers, '0'))
|
|
|
|
|
<livewire:project.shared.get-logs wire:key='{{ $container }}' :server="data_get($servers, '0')"
|
2025-12-04 09:57:58 +00:00
|
|
|
:resource="$resource" :container="$container"
|
|
|
|
|
:expandByDefault="count($containers) === 1" />
|
2025-06-05 11:24:26 +00:00
|
|
|
@else
|
|
|
|
|
<div>No functional server found for the service.</div>
|
|
|
|
|
@endif
|
|
|
|
|
@empty
|
|
|
|
|
<div class="pt-2">No containers are running.</div>
|
|
|
|
|
@endforelse
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
2023-10-02 11:38:16 +00:00
|
|
|
</div>
|
|
|
|
|
@endif
|
2023-12-07 18:06:32 +00:00
|
|
|
</div>
|