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
fix(ui): follow-up polish + extend deploy-log reopen to apps
Aditya Tripathi7a96f0900d6e
diff --git a/app/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.phpindex 830a4eace8..e52d7c32ec 100644--- a/app/Livewire/Project/Application/Heading.php+++ b/app/Livewire/Project/Application/Heading.php@@ -5,6 +5,7 @@ namespace App\Livewire\Project\Application;use App\Actions\Application\StopApplication;use App\Actions\Docker\GetContainersStatus;use App\Models\Application;+use App\Models\ApplicationDeploymentQueue;use Illuminate\Foundation\Auth\Access\AuthorizesRequests;use Livewire\Component;@@ -79,6 +80,19 @@ class Heading extends Component$this->checkStatus();}+ /**+ * Log-page URL of the deployment currently running for this application, so a+ * "Deploying… View log" indicator can link back to it after the user navigates+ * away. Re-evaluated on the heading's 10s poll. Null when nothing is running.+ */+ public function getRunningDeploymentUrlProperty(): ?string+ {+ return ApplicationDeploymentQueue::where('application_id', $this->application->id)+ ->whereIn('status', ['in_progress', 'queued'])+ ->orderByDesc('id')+ ->value('deployment_url');+ }+public function force_deploy_without_cache(){try {diff --git a/resources/views/components/deploying-indicator.blade.php b/resources/views/components/deploying-indicator.blade.phpindex e18543234e..912af3537a 100644--- a/resources/views/components/deploying-indicator.blade.php+++ b/resources/views/components/deploying-indicator.blade.php@@ -1,19 +1,34 @@@props(['action' => 'reopenDeployment','label' => 'Deploying',+ 'href' => null,])-{{-- Persistent affordance shown while a deploy/start is running. Re-opens the- live log dialog (the process runs server-side even after the modal closes).- Uses the Alpine $wire magic (not wire:click) so it also works when the- button is teleported to the desktop action HUD, outside the Livewire root. --}}-<button type="button" x-on:click="$wire.{{ $action }}()"- {{ $attributes->class('inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-[11px] font-medium ring-1 transition-colors bg-coollabs/10 text-coollabs ring-coollabs/25 hover:bg-coollabs/15 dark:bg-warning/15 dark:text-warning dark:ring-warning/25 dark:hover:bg-warning/20') }}- title="View the running deployment log">- <svg class="size-3 animate-spin" viewBox="0 0 24 24" fill="none" aria-hidden="true">- <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" opacity="0.25" />- <path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" />- </svg>- <span>{{ $label }}…</span>- <span class="opacity-70">View log</span>-</button>+@php+ // Persistent affordance shown while a deploy/start is running. Either re-opens+ // the in-page live-log dialog (services/databases, via $wire) or links to the+ // running deployment's log page (applications, via href) so the log is never lost.+ $deployingIndicatorClasses = 'inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-[11px] font-medium ring-1 transition-colors bg-coollabs/10 text-coollabs ring-coollabs/25 hover:bg-coollabs/15 hover:no-underline dark:bg-warning/15 dark:text-warning dark:ring-warning/25 dark:hover:bg-warning/20';+@endphp++@if ($href)+ <a href="{{ $href }}" {{ wireNavigate() }} {{ $attributes->class($deployingIndicatorClasses) }}+ title="View the running deployment log">+ <svg class="size-3 animate-spin" viewBox="0 0 24 24" fill="none" aria-hidden="true">+ <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" opacity="0.25" />+ <path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" />+ </svg>+ <span>{{ $label }}…</span>+ <span class="opacity-70">View log</span>+ </a>+@else+ <button type="button" x-on:click="$wire.{{ $action }}()" {{ $attributes->class($deployingIndicatorClasses) }}+ title="View the running deployment log">+ <svg class="size-3 animate-spin" viewBox="0 0 24 24" fill="none" aria-hidden="true">+ <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" opacity="0.25" />+ <path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" />+ </svg>+ <span>{{ $label }}…</span>+ <span class="opacity-70">View log</span>+ </button>+@endifdiff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.phpindex 05a2555c75..69cb937879 100644--- a/resources/views/components/forms/input.blade.php+++ b/resources/views/components/forms/input.blade.php@@ -1,10 +1,16 @@@php// Copy affordance reads the live Livewire value. The bound property comes// either from the `id`-derived modelBinding or from a passthrough- // `wire:model` attribute (used by read-only fields like DB URLs).- $copyModel = $copyable- ? ($modelBinding !== 'null' ? $modelBinding : $attributes->get('wire:model'))- : null;+ // `wire:model` attribute (used by read-only fields like DB URLs). Resolve to a+ // single JS expression here — a directive inside the <x-copy-button> tag would+ // break Blade's component-tag compiler.+ $copyResolve = null;+ if ($copyable) {+ $copyModel = $modelBinding !== 'null' ? $modelBinding : $attributes->get('wire:model');+ $copyResolve = $copyModel+ ? "\$wire.get('".$copyModel."')"+ : (string) \Illuminate\Support\Js::from($value);+ }@endphp<div @class([@@ -58,9 +64,7 @@</button>@endif@if ($copyable)- <x-copy-button- @if ($copyModel) resolve="$wire.get('{{ $copyModel }}')" @else :value="$value" @endif- label="Copy to clipboard"+ <x-copy-button :resolve="$copyResolve" label="Copy to clipboard"class="absolute top-1/2 z-10 -translate-y-1/2 {{ $allowToPeak ? 'right-8' : 'right-1' }}" />@endif@@ -80,9 +84,7 @@placeholder="{{ $attributes->get('placeholder') }}"@if ($autofocus) x-ref="autofocusInput" autofocus @endif>@if ($copyable)- <x-copy-button- @if ($copyModel) resolve="$wire.get('{{ $copyModel }}')" @else :value="$value" @endif- label="Copy to clipboard"+ <x-copy-button :resolve="$copyResolve" label="Copy to clipboard"class="absolute top-1/2 right-1 z-10 -translate-y-1/2" /></div>@endifdiff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.phpindex e3d123106a..6975eb1e0e 100644--- a/resources/views/components/navbar.blade.php+++ b/resources/views/components/navbar.blade.php@@ -105,7 +105,9 @@</li>@endcan{{-- Infrastructure --}}- <li class="nav-section mt-3" :class="collapsed && 'lg:hidden'">Infrastructure</li>+ <li class="nav-section mt-3" aria-hidden="true"+ :class="collapsed && 'lg:mx-2.5 lg:my-2 lg:h-0 lg:overflow-hidden lg:border-t lg:border-neutral-200 lg:p-0 lg:text-transparent dark:lg:border-white/10'">+ Infrastructure</li><li><a title="Servers" {{ wireNavigate() }}class="{{ request()->is('server/*') || request()->is('servers') ? 'menu-item menu-item-active' : 'menu-item' }}"@@ -148,7 +150,9 @@</li>{{-- Manage --}}- <li class="nav-section mt-3" :class="collapsed && 'lg:hidden'">Manage</li>+ <li class="nav-section mt-3" aria-hidden="true"+ :class="collapsed && 'lg:mx-2.5 lg:my-2 lg:h-0 lg:overflow-hidden lg:border-t lg:border-neutral-200 lg:p-0 lg:text-transparent dark:lg:border-white/10'">+ Manage</li><li><a title="Team" {{ wireNavigate() }}class="{{ request()->is('team*') ? 'menu-item-active menu-item' : 'menu-item' }}"@@ -216,7 +220,9 @@@endif@if (isCloud() && ! isSubscribed()){{-- Unsubscribed cloud has no workspace items — keep these at the top of the list. --}}- <li class="nav-section" :class="collapsed && 'lg:hidden'">Account</li>+ <li class="nav-section" aria-hidden="true"+ :class="collapsed && 'lg:mx-2.5 lg:my-2 lg:h-0 lg:overflow-hidden lg:border-t lg:border-neutral-200 lg:p-0 lg:text-transparent dark:lg:border-white/10'">+ Account</li><li><a title="Subscription" {{ wireNavigate() }}class="{{ request()->is('subscription*') ? 'menu-item-active menu-item' : 'menu-item' }}"diff --git a/resources/views/components/shared-variables/layout.blade.php b/resources/views/components/shared-variables/layout.blade.phpindex 4fd2b58697..c5e1ee7bd6 100644--- a/resources/views/components/shared-variables/layout.blade.php+++ b/resources/views/components/shared-variables/layout.blade.php@@ -8,14 +8,14 @@];@endphp-<section class="w-full max-w-none">+<section class="application-settings-workspace w-full max-w-none"><header class="mb-6 xl:hidden"><h1 class="text-[24px]! leading-7! font-semibold! tracking-tight!">Shared variables</h1><p class="mt-1 text-[13px] text-neutral-500 dark:text-fg-dim">Reusable environment variables across resources</p></header>- <div class="grid min-w-0 gap-8 xl:grid-cols-[210px_minmax(0,1fr)] xl:gap-10">- <aside class="min-w-0 xl:self-start">+ <div class="grid min-w-0 gap-8 xl:mt-0 xl:grid-cols-[210px_minmax(0,1fr)] xl:gap-10">+ <aside class="application-settings-navigation min-w-0 xl:sticky xl:top-26 xl:self-start"><nav aria-label="Shared variables"class="grid grid-cols-2 gap-0.5 border-y border-neutral-200 py-3 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-1 xl:border-y-0 xl:py-0 dark:border-white/[0.06]">@foreach ($sharedVariablesMenuItems as $menuItem)@@ -29,7 +29,7 @@</nav></aside>- <div class="min-w-0">+ <div class="min-w-0 xl:mt-3">{{ $slot }}</div></div>diff --git a/resources/views/livewire/dashboard.blade.php b/resources/views/livewire/dashboard.blade.phpindex bc6cb587cf..ca077c7f2e 100644--- a/resources/views/livewire/dashboard.blade.php+++ b/resources/views/livewire/dashboard.blade.php@@ -77,14 +77,14 @@</div><div class="mt-auto flex items-center justify-between gap-3 border-t border-neutral-100 pt-2.5 dark:border-white/[0.06]">- <div class="flex min-w-0 items-center gap-3 text-[11px] font-medium text-neutral-500 dark:text-fg-dim">- <span class="inline-flex items-center gap-1"- title="{{ $project->environments->count() }} {{ str('environment')->plural($project->environments->count()) }}">+ <div class="relative z-10 flex min-w-0 items-center gap-3 text-[11px] font-medium text-neutral-500 dark:text-fg-dim">+ <span class="inline-flex items-center gap-1" data-tooltip="Environments"+ aria-label="Environments"><x-reicon name="layers" class="size-3.5 text-neutral-400 dark:text-fg-faint" />{{ $project->environments->count() }}</span>- <span class="inline-flex items-center gap-1"- title="{{ $resourceCount }} {{ str('resource')->plural($resourceCount) }}">+ <span class="inline-flex items-center gap-1" data-tooltip="Resources"+ aria-label="Resources"><x-reicon name="grid" class="size-3.5 text-neutral-400 dark:text-fg-faint" />{{ $resourceCount }}</span>diff --git a/resources/views/livewire/project/application/heading.blade.php b/resources/views/livewire/project/application/heading.blade.phpindex e2af1e96aa..fd41fc99ac 100644--- a/resources/views/livewire/project/application/heading.blade.php+++ b/resources/views/livewire/project/application/heading.blade.php@@ -33,6 +33,9 @@<div class="relative flex w-full min-w-0 items-center gap-2"><x-status-summary :status="$application->status" align="right" /><x-applications.links :application="$application" compact />+ @if ($this->runningDeploymentUrl)+ <x-deploying-indicator :href="$this->runningDeploymentUrl" />+ @endif</div><div class="flex w-full flex-wrap gap-1"><x-application.restart-limit-warning :application="$application" />@@ -140,6 +143,9 @@<divclass="resource-heading-navbar application-heading-actions flex w-full min-w-0 items-center justify-start gap-1 overflow-visible xl:w-auto xl:justify-end"><div class="resource-heading-actions flex shrink-0 items-center gap-0.5">+ @if ($this->runningDeploymentUrl)+ <x-deploying-indicator :href="$this->runningDeploymentUrl" class="mr-1" />+ @endif@if ($application->build_pack === 'dockercompose' && is_null($application->docker_compose_raw))<span class="px-2 text-[13px] text-neutral-500 dark:text-fg-dim">Load a Compose file to deploy.</span>@elsediff --git a/resources/views/livewire/project/index.blade.php b/resources/views/livewire/project/index.blade.phpindex a60fd39b94..0de0b17bd2 100644--- a/resources/views/livewire/project/index.blade.php+++ b/resources/views/livewire/project/index.blade.php@@ -126,14 +126,14 @@</div><div class="mt-auto flex items-center justify-between gap-3 border-t border-neutral-100 pt-2.5 dark:border-white/[0.06]">- <div class="flex min-w-0 items-center gap-3 text-[11px] font-medium text-neutral-500 dark:text-fg-dim">- <span class="inline-flex items-center gap-1"- :title="`${project.environmentCount} ${project.environmentCount === 1 ? 'environment' : 'environments'}`">+ <div class="relative z-10 flex min-w-0 items-center gap-3 text-[11px] font-medium text-neutral-500 dark:text-fg-dim">+ <span class="inline-flex items-center gap-1" data-tooltip="Environments"+ aria-label="Environments"><x-reicon name="layers" class="size-3.5 text-neutral-400 dark:text-fg-faint" /><span x-text="project.environmentCount"></span></span>- <span class="inline-flex items-center gap-1"- :title="`${project.resourceCount} ${project.resourceCount === 1 ? 'resource' : 'resources'}`">+ <span class="inline-flex items-center gap-1" data-tooltip="Resources"+ aria-label="Resources"><x-reicon name="grid" class="size-3.5 text-neutral-400 dark:text-fg-faint" /><span x-text="project.resourceCount"></span></span>@@ -191,13 +191,12 @@</div><div class="flex items-center gap-3 text-[12px] font-medium text-neutral-600 dark:text-fg-dim">- <span class="inline-flex items-center gap-1"- :title="`${project.environmentCount} ${project.environmentCount === 1 ? 'environment' : 'environments'}`">+ <span class="inline-flex items-center gap-1" data-tooltip="Environments"+ aria-label="Environments"><x-reicon name="layers" class="size-3.5 text-neutral-400 dark:text-fg-faint" /><span x-text="project.environmentCount"></span></span>- <span class="inline-flex items-center gap-1"- :title="`${project.resourceCount} ${project.resourceCount === 1 ? 'resource' : 'resources'}`">+ <span class="inline-flex items-center gap-1" data-tooltip="Resources" aria-label="Resources"><x-reicon name="grid" class="size-3.5 text-neutral-400 dark:text-fg-faint" /><span x-text="project.resourceCount"></span></span>diff --git a/resources/views/livewire/project/resource/index.blade.php b/resources/views/livewire/project/resource/index.blade.phpindex 025da57b27..13e33e683f 100644--- a/resources/views/livewire/project/resource/index.blade.php+++ b/resources/views/livewire/project/resource/index.blade.php@@ -12,6 +12,14 @@</p></div><div class="flex w-fit shrink-0 items-center gap-2">+ <a href="{{ route('shared-variables.environment.show', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid]) }}"+ {{ wireNavigate() }}+ class="button whitespace-nowrap"+ title="Shared variables for this environment"+ aria-label="Shared variables for {{ $environment->name }}">+ <x-reicon name="variables" class="size-3.5" />+ Shared variables+ </a>@can('update', $project)<a href="{{ route('project.environment.edit', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid]) }}"{{ wireNavigate() }}