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: move terminal to separate view on services
Andras Bacsaie937d30545c4
diff --git a/app/Livewire/Project/Service/Navbar.php b/app/Livewire/Project/Service/Navbar.phpindex 674182df51..e6bb6d9bf8 100644--- a/app/Livewire/Project/Service/Navbar.php+++ b/app/Livewire/Project/Service/Navbar.php@@ -20,6 +20,8 @@ class Navbar extends Componentpublic $isDeploymentProgress = false;+ public $title = 'Configuration';+public function mount(){if (str($this->service->status())->contains('running') && is_null($this->service->config_hash)) {diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.phpindex c5ac0412ff..4b692f9a9d 100644--- a/resources/views/livewire/project/service/configuration.blade.php+++ b/resources/views/livewire/project/service/configuration.blade.php@@ -23,10 +23,6 @@@click.prevent="activeTab = 'scheduled-tasks'; window.location.hash = 'scheduled-tasks'"href="#">Scheduled Tasks</a>- <a class="menu-item sm:min-w-fit" :class="activeTab === 'terminal' && 'menu-item-active'"- @click.prevent="activeTab = 'terminal';- window.location.hash = 'terminal'"- href="#">Terminal</a><a class="menu-item sm:min-w-fit" :class="activeTab === 'logs' && 'menu-item-active'"@click.prevent="activeTab = 'logs';window.location.hash = 'logs'"@@ -191,9 +187,6 @@<div x-cloak x-show="activeTab === 'logs'"><livewire:project.shared.logs :resource="$service" /></div>- <div x-cloak x-show="activeTab === 'terminal'">- <livewire:project.shared.execute-container-command :resource="$service" />- </div><div x-cloak x-show="activeTab === 'environment-variables'"><livewire:project.shared.environment-variable.all :resource="$service" /></div>diff --git a/resources/views/livewire/project/service/navbar.blade.php b/resources/views/livewire/project/service/navbar.blade.phpindex 125f9121ab..8193fba578 100644--- a/resources/views/livewire/project/service/navbar.blade.php+++ b/resources/views/livewire/project/service/navbar.blade.php@@ -6,17 +6,21 @@<livewire:activity-monitor header="Logs" showWaiting fullHeight /></x-slot:content></x-slide-over>- <h1>Configuration</h1>+ <h1>{{ $title }}</h1><x-resources.breadcrumbs :resource="$service" :parameters="$parameters" /><div class="navbar-main" x-data>- <nav class="flex items-center flex-shrink-0 gap-6 scrollbar min-h-10 whitespace-nowrap">+ <nav class="flex flex-shrink-0 gap-6 items-center whitespace-nowrap scrollbar min-h-10"><a class="{{ request()->routeIs('project.service.configuration') ? 'dark:text-white' : '' }}"href="{{ route('project.service.configuration', $parameters) }}"><button>Configuration</button></a>+ <a class="{{ request()->routeIs('project.service.command') ? 'dark:text-white' : '' }}"+ href="{{ route('project.service.command', $parameters) }}">+ <button>Terminal</button>+ </a><x-services.links :service="$service" /></nav>- <div class="flex flex-wrap items-center order-first gap-2 sm:order-last">+ <div class="flex flex-wrap order-first gap-2 items-center sm:order-last">@if (str($service->status())->contains('running'))<button @click="$wire.dispatch('restartEvent')" class="gap-2 button"><svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">@@ -71,7 +75,7 @@</x-modal-confirmation>@elseif (str($service->status())->contains('exited'))<button wire:click='stop(true)' class="gap-2 button">- <svg class="w-5 h-5 " viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">+ <svg class="w-5 h-5" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path fill="red" d="M26 20h-6v-2h6zm4 8h-6v-2h6zm-2-4h-6v-2h6z" /><path fill="red"d="M17.003 20a4.895 4.895 0 0 0-2.404-4.173L22 3l-1.73-1l-7.577 13.126a5.699 5.699 0 0 0-5.243 1.503C3.706 20.24 3.996 28.682 4.01 29.04a1 1 0 0 0 1 .96h14.991a1 1 0 0 0 .6-1.8c-3.54-2.656-3.598-8.146-3.598-8.2Zm-5.073-3.003A3.11 3.11 0 0 1 15.004 20c0 .038.002.208.017.469l-5.9-2.624a3.8 3.8 0 0 1 2.809-.848ZM15.45 28A5.2 5.2 0 0 1 14 25h-2a6.5 6.5 0 0 0 .968 3h-2.223A16.617 16.617 0 0 1 10 24H8a17.342 17.342 0 0 0 .665 4H6c.031-1.836.29-5.892 1.803-8.553l7.533 3.35A13.025 13.025 0 0 0 17.596 28Z" />diff --git a/resources/views/livewire/project/shared/execute-container-command.blade.php b/resources/views/livewire/project/shared/execute-container-command.blade.phpindex b8bbecf7c2..0a406e1522 100644--- a/resources/views/livewire/project/shared/execute-container-command.blade.php+++ b/resources/views/livewire/project/shared/execute-container-command.blade.php@@ -10,7 +10,7 @@<h1>Terminal</h1><livewire:project.database.heading :database="$resource" />@elseif ($type === 'service')- <h2>Terminal</h2>+ <livewire:project.service.navbar :service="$resource" :parameters="$parameters" title="Terminal" />@endif<div x-init="$wire.loadContainers"><div class="pt-4" wire:loading wire:target='loadContainers'>diff --git a/routes/web.php b/routes/web.phpindex 87b4056d22..e9c0b52c19 100644--- a/routes/web.php+++ b/routes/web.php@@ -195,8 +195,8 @@ Route::middleware(['auth', 'verified'])->group(function () {});Route::prefix('project/{project_uuid}/{environment_name}/service/{service_uuid}')->group(function () {Route::get('/', ServiceConfiguration::class)->name('project.service.configuration');- Route::get('/{stack_service_uuid}', ServiceIndex::class)->name('project.service.index');Route::get('/terminal', ExecuteContainerCommand::class)->name('project.service.command');+ Route::get('/{stack_service_uuid}', ServiceIndex::class)->name('project.service.index');Route::get('/tasks/{task_uuid}', ScheduledTaskShow::class)->name('project.service.scheduled-tasks');});