mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 02:24:11 -05:00
feat(ui): show traefik dashboard link beside proxy actions
This commit is contained in:
@@ -156,8 +156,17 @@
|
||||
class="min-w-0 truncate text-[24px]! leading-7! font-semibold! tracking-tight! text-black dark:text-fg">
|
||||
{{ $server->name }}
|
||||
</h1>
|
||||
<x-server.status-summary :server="$server" :proxy-status="$proxyStatus"
|
||||
:show-sentinel-status="$showSentinelStatus" />
|
||||
<div class="flex w-full min-w-0 items-center gap-2">
|
||||
<x-server.status-summary :server="$server" :proxy-status="$proxyStatus"
|
||||
:show-sentinel-status="$showSentinelStatus" />
|
||||
@if ($traefikDashboardAvailable)
|
||||
<a target="_blank" href="http://{{ $serverIp }}:8080" title="Open Traefik dashboard"
|
||||
class="inline-flex h-6 shrink-0 items-center gap-1.5 rounded-full border border-neutral-200 bg-neutral-100 px-2 text-xs font-medium leading-none text-neutral-700 dark:border-white/[0.12] dark:bg-white/[0.07] dark:text-white">
|
||||
<x-reicon name="external-link" class="size-3" />
|
||||
Traefik
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -191,13 +200,6 @@
|
||||
<x-reicon name="refresh" class="size-3.5 opacity-70" />
|
||||
Refresh Proxy Status
|
||||
</button>
|
||||
@if ($traefikDashboardAvailable)
|
||||
<a class="listbox-option justify-start! gap-2.5!" target="_blank"
|
||||
href="http://{{ $serverIp }}:8080" @click="open = false" role="menuitem">
|
||||
<x-reicon name="external-link" class="size-3.5 opacity-70" />
|
||||
Traefik Dashboard
|
||||
</a>
|
||||
@endif
|
||||
</x-split-action>
|
||||
|
||||
{{-- Programmatic open only (clicked from the Actions menu). Keep fully
|
||||
@@ -273,6 +275,15 @@
|
||||
|
||||
@if ($server->proxySet())
|
||||
@can('manageProxy', $server)
|
||||
@if ($traefikDashboardAvailable)
|
||||
<div class="resource-heading-menus shrink-0">
|
||||
<a class="app-tab shrink-0 gap-1" target="_blank" title="Open Traefik dashboard"
|
||||
href="http://{{ $serverIp }}:8080">
|
||||
<x-reicon name="external-link" class="size-3.5 shrink-0 opacity-70" />
|
||||
Traefik Dashboard
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
<x-split-action id="server-desktop-actions" class="resource-heading-actions shrink-0">
|
||||
@if ($proxyCanBeStopped)
|
||||
<x-slot:main wire:loading.attr="disabled" wire:loading.class="is-loading"
|
||||
@@ -299,13 +310,6 @@
|
||||
<x-reicon name="refresh" class="size-3.5 opacity-70" />
|
||||
Refresh Proxy Status
|
||||
</button>
|
||||
@if ($traefikDashboardAvailable)
|
||||
<a class="listbox-option justify-start! gap-2.5!" target="_blank"
|
||||
href="http://{{ $serverIp }}:8080" @click="open = false" role="menuitem">
|
||||
<x-reicon name="external-link" class="size-3.5 opacity-70" />
|
||||
Traefik Dashboard
|
||||
</a>
|
||||
@endif
|
||||
</x-split-action>
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
@@ -287,12 +287,14 @@ it('promotes a primary action for service and proxy lifecycle controls', functio
|
||||
}
|
||||
});
|
||||
|
||||
it('places the Traefik dashboard last in the server Actions menu', function () {
|
||||
it('links the Traefik dashboard beside the server actions instead of inside the dropdown', function () {
|
||||
$navbar = file_get_contents(resource_path('views/livewire/server/navbar.blade.php'));
|
||||
$actions = str($navbar)->after('id="server-desktop-actions"')->before('@endcan')->toString();
|
||||
$desktopActions = str($navbar)->after('id="server-desktop-actions"')->before('</x-split-action>')->toString();
|
||||
$mobileActions = str($navbar)->after('id="server-mobile-actions"')->before('</x-split-action>')->toString();
|
||||
|
||||
expect(strpos($actions, 'Refresh Proxy Status'))
|
||||
->toBeLessThan(strpos($actions, 'Traefik Dashboard'));
|
||||
expect($desktopActions)->not->toContain('Traefik')
|
||||
->and($mobileActions)->not->toContain('Traefik')
|
||||
->and($navbar)->toContain('Traefik Dashboard');
|
||||
});
|
||||
|
||||
it('keeps database lifecycle controls direct and highlights the primary action', function () {
|
||||
|
||||
Reference in New Issue
Block a user