mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-16 10:15:05 +00:00
feat(ui): add Open server links on destination cards
Link primary and additional destination server cards to their server pages via wire:navigate, and cover the markup in a feature test.
This commit is contained in:
1 parent
8ae9c03209
commit
a6f71909fd
2 files changed
+15
No files matched your search
@@ -33,6 +33,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-wrap items-center gap-2 sm:justify-end">
|
<div class="flex flex-wrap items-center gap-2 sm:justify-end">
|
||||||
|
<a href="{{ route('server.show', ['server_uuid' => data_get($resource, 'destination.server.uuid')]) }}"
|
||||||
|
{{ wireNavigate() }} class="button">Open server</a>
|
||||||
<x-status-summary :status="$resource->status" />
|
<x-status-summary :status="$resource->status" />
|
||||||
@if ($hasAdditionalDestinations)
|
@if ($hasAdditionalDestinations)
|
||||||
<x-forms.button canGate="deploy" :canResource="$resource"
|
<x-forms.button canGate="deploy" :canResource="$resource"
|
||||||
@@ -86,6 +88,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-wrap items-center gap-2 lg:justify-end">
|
<div class="flex flex-wrap items-center gap-2 lg:justify-end">
|
||||||
|
<a href="{{ route('server.show', ['server_uuid' => data_get($destination, 'server.uuid')]) }}"
|
||||||
|
{{ wireNavigate() }} class="button">Open server</a>
|
||||||
@if ($destinationStatus->startsWith('running'))
|
@if ($destinationStatus->startsWith('running'))
|
||||||
<x-status.running :status="$destinationStatus->value()" />
|
<x-status.running :status="$destinationStatus->value()" />
|
||||||
@elseif ($destinationStatus->startsWith(['starting', 'restarting']))
|
@elseif ($destinationStatus->startsWith(['starting', 'restarting']))
|
||||||
@@ -211,6 +215,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-wrap items-center gap-2 sm:justify-end">
|
<div class="flex flex-wrap items-center gap-2 sm:justify-end">
|
||||||
|
<a href="{{ route('server.show', ['server_uuid' => data_get($resource, 'destination.server.uuid')]) }}"
|
||||||
|
{{ wireNavigate() }} class="button">Open server</a>
|
||||||
@if ($primaryStatus->startsWith('running'))
|
@if ($primaryStatus->startsWith('running'))
|
||||||
<x-status.running :status="$primaryStatus->value()" />
|
<x-status.running :status="$primaryStatus->value()" />
|
||||||
@elseif ($primaryStatus->startsWith(['starting', 'restarting']))
|
@elseif ($primaryStatus->startsWith(['starting', 'restarting']))
|
||||||
|
|||||||
@@ -8,3 +8,12 @@ it('uses the shared status summary in the primary application server card', func
|
|||||||
->toContain('<x-status-summary :status="$resource->status" />')
|
->toContain('<x-status-summary :status="$resource->status" />')
|
||||||
->not->toContain('<x-status :resource="$resource"');
|
->not->toContain('<x-status :resource="$resource"');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('links each configured server card to its server page', function () {
|
||||||
|
$view = file_get_contents(resource_path('views/livewire/project/shared/destination.blade.php'));
|
||||||
|
|
||||||
|
expect($view)
|
||||||
|
->toContain("route('server.show', ['server_uuid' => data_get(\$resource, 'destination.server.uuid')])")
|
||||||
|
->toContain("route('server.show', ['server_uuid' => data_get(\$destination, 'server.uuid')])")
|
||||||
|
->toContain('Open server');
|
||||||
|
});
|
||||||
Reference in new issue
Block a user