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: refactor run-command
Andras Bacsai162fb7bfc511
diff --git a/app/Livewire/RunCommand.php b/app/Livewire/RunCommand.phpindex 0aaf321af4..3650f2e41a 100644--- a/app/Livewire/RunCommand.php+++ b/app/Livewire/RunCommand.php@@ -2,6 +2,7 @@namespace App\Livewire;+use App\Models\Server;use Livewire\Attributes\On;use Livewire\Component;@@ -13,12 +14,12 @@ class RunCommand extends Componentpublic $containers = [];- public function mount($servers)+ public function mount(){if (! auth()->user()->isAdmin()) {abort(403);}- $this->servers = $servers;+ $this->servers = Server::isReachable()->get();$this->containers = $this->getAllActiveContainers();}diff --git a/app/Livewire/Terminal/Index.php b/app/Livewire/Terminal/Index.phpindex 3f777a8ffb..8c59bdcbf6 100644--- a/app/Livewire/Terminal/Index.php+++ b/app/Livewire/Terminal/Index.php@@ -2,18 +2,10 @@namespace App\Livewire\Terminal;-use App\Models\Server;use Livewire\Component;class Index extends Component{- public $servers = [];-- public function mount()- {- $this->servers = Server::isReachable()->get();- }-public function render(){return view('livewire.terminal.index');diff --git a/resources/views/livewire/terminal/index.blade.php b/resources/views/livewire/terminal/index.blade.phpindex e2f1c82e48..34a2d4c213 100644--- a/resources/views/livewire/terminal/index.blade.php+++ b/resources/views/livewire/terminal/index.blade.php@@ -8,11 +8,5 @@<x-helperhelper="If you're having trouble connecting to your server, make sure that the port is open.<br><br><a class='underline' href='https://coolify.io/docs/knowledge-base/server/firewall/#terminal' target='_blank'>Documentation</a>"></x-helper></div>- @if ($servers->count() > 0)- <livewire:run-command :servers="$servers" />- @else- <div>- <div>No servers found. Without a server, you won't be able to do much.</div>- </div>- @endif+ <livewire:run-command /></div>