fix: unfunctional server should see resources
This commit is contained in:
parent
7a92ecfa30
commit
7aca4930db
@ -550,6 +550,7 @@ $schema://$host {
|
||||
}
|
||||
public function loadUnmanagedContainers()
|
||||
{
|
||||
try {
|
||||
if ($this->isFunctional()) {
|
||||
$containers = instant_remote_process(["docker ps -a --format '{{json .}}' "], $this);
|
||||
$containers = format_docker_command_output_to_json($containers);
|
||||
@ -565,6 +566,10 @@ $schema://$host {
|
||||
} else {
|
||||
return collect([]);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e);
|
||||
}
|
||||
|
||||
}
|
||||
public function hasDefinedResources()
|
||||
{
|
||||
|
@ -1,13 +1,11 @@
|
||||
<div>
|
||||
<x-server.navbar :server="$server" :parameters="$parameters" />
|
||||
@if ($server->isFunctional())
|
||||
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'managed' }" class="flex h-full">
|
||||
<div class="flex flex-col gap-4">
|
||||
<a :class="activeTab === 'managed' && 'dark:text-white'"
|
||||
@click.prevent="activeTab = 'managed'; window.location.hash = 'managed'" href="#">Managed</a>
|
||||
<a :class="activeTab === 'unmanaged' && 'dark:text-white'"
|
||||
@click.prevent="activeTab = 'unmanaged'; window.location.hash = 'unmanaged'"
|
||||
href="#">Unmanaged</a>
|
||||
@click.prevent="activeTab = 'unmanaged'; window.location.hash = 'unmanaged'" href="#">Unmanaged</a>
|
||||
</div>
|
||||
<div class="w-full pl-8">
|
||||
<div x-cloak x-show="activeTab === 'managed'" class="h-full">
|
||||
@ -52,8 +50,8 @@
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">
|
||||
{{ data_get($resource, 'environment.name') }}
|
||||
</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap hover:underline"><a
|
||||
class=""
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap hover:underline">
|
||||
<a class=""
|
||||
href="{{ $resource->link() }}">{{ $resource->name }}
|
||||
<x-internal-link /></a>
|
||||
</td>
|
||||
@ -64,8 +62,7 @@
|
||||
<x-status.services :service="$resource"
|
||||
:showRefreshButton="false" />
|
||||
@else
|
||||
<x-status.index :resource="$resource"
|
||||
:showRefreshButton="false" />
|
||||
<x-status.index :resource="$resource" :showRefreshButton="false" />
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@ -159,7 +156,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div>Server is not validated. Validate first.</div>
|
||||
@endif
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user