mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-16 18:15:40 +00:00
fix(destinations): handle empty and server-scoped destinations
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.
This commit is contained in:
1 parent
a67cc1d3a9
commit
65c0c92c02
6 files changed
+159
-41
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Livewire\Destination;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Component;
|
||||
|
||||
@@ -11,9 +12,15 @@ class Index extends Component
|
||||
#[Locked]
|
||||
public $servers;
|
||||
|
||||
public function mount()
|
||||
#[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()
|
||||
|
||||
Reference in new issue
Block a user