feat: Add metrics warning for servers without Sentinel enabled

This commit is contained in:
Andras Bacsai 2024-06-21 11:20:35 +02:00
parent db39458295
commit f607aa1233

View File

@ -5,6 +5,12 @@
<div class="pb-4">Basic metrics for your container.</div>
@if ($resource->getMorphClass() === 'App\Models\Application' && $resource->build_pack === 'dockercompose')
<div class="alert alert-warning">Metrics are not available for Docker Compose applications yet!</div>
@elseif(!$resource->destination->server->isSentinelEnabled())
<div class="alert alert-warning">Metrics are only available for servers with Sentinel enabled!</div>
<div> Go to <a class="underline dark:text-white"
href="{{ route('server.show', $resource->destination->server->uuid) }}">Server settings</a> to
enable
it.</div>
@else
@if (!str($resource->status)->contains('running'))
<div class="alert alert-warning">Metrics are only available when the application is running!</div>