An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
feat(ui): add Open server links on destination cards
Andras Bacsaia6f71909fd68
diff --git a/resources/views/livewire/project/shared/destination.blade.php b/resources/views/livewire/project/shared/destination.blade.phpindex 720e85bdcd..a1f7923d3a 100644--- a/resources/views/livewire/project/shared/destination.blade.php+++ b/resources/views/livewire/project/shared/destination.blade.php@@ -33,6 +33,8 @@</div><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" />@if ($hasAdditionalDestinations)<x-forms.button canGate="deploy" :canResource="$resource"@@ -86,6 +88,8 @@</div><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'))<x-status.running :status="$destinationStatus->value()" />@elseif ($destinationStatus->startsWith(['starting', 'restarting']))@@ -211,6 +215,8 @@</div><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'))<x-status.running :status="$primaryStatus->value()" />@elseif ($primaryStatus->startsWith(['starting', 'restarting']))diff --git a/tests/Feature/ApplicationDestinationStatusBadgeTest.php b/tests/Feature/ApplicationDestinationStatusBadgeTest.phpindex 11eeba5156..9dfbedb563 100644--- a/tests/Feature/ApplicationDestinationStatusBadgeTest.php+++ b/tests/Feature/ApplicationDestinationStatusBadgeTest.php@@ -8,3 +8,12 @@ it('uses the shared status summary in the primary application server card', func->toContain('<x-status-summary :status="$resource->status" />')->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');+});