mirror of
https://github.com/coollabsio/coolify.git
synced 2026-06-14 03:19:51 +00:00
65c0c92c02
Build the global destinations list from actual destination records so empty servers do not render duplicate empty states. Allow creating Docker destinations for a selected team server outside the global usable list, authorize swarm creation correctly, and store discovered swarm network names from the selected network. Add feature coverage for empty states, selected-server mounting, and swarm destination creation.
31 lines
645 B
PHP
31 lines
645 B
PHP
<?php
|
|
|
|
namespace App\Livewire\Destination;
|
|
|
|
use App\Models\Server;
|
|
use Illuminate\Support\Collection;
|
|
use Livewire\Attributes\Locked;
|
|
use Livewire\Component;
|
|
|
|
class Index extends Component
|
|
{
|
|
#[Locked]
|
|
public $servers;
|
|
|
|
#[Locked]
|
|
public Collection $destinations;
|
|
|
|
public function mount(): void
|
|
{
|
|
$this->servers = Server::isUsable()->get();
|
|
$this->destinations = $this->servers
|
|
->flatMap(fn (Server $server) => $server->standaloneDockers->concat($server->swarmDockers))
|
|
->values();
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.destination.index');
|
|
}
|
|
}
|