This commit is contained in:
Andras Bacsai
2023-06-15 15:38:15 +02:00
parent c9c56c915c
commit f828cd813b
7 changed files with 82 additions and 36 deletions

View File

@@ -24,16 +24,18 @@ class StandaloneDocker extends Component
];
public function mount()
{
if (!$this->server_id) {
if (request()->query('server_id')) {
$this->server_id = request()->query('server_id');
} else {
if ($this->servers->count() > 0) {
$this->server_id = $this->servers->first()->id;
}
if (request()->query('server_id')) {
$this->server_id = request()->query('server_id');
} else {
if ($this->servers->count() > 0) {
$this->server_id = $this->servers->first()->id;
}
}
$this->network = new Cuid2(7);
if (request()->query('network_name')) {
$this->network = request()->query('network_name');
} else {
$this->network = new Cuid2(7);
}
$this->name = generate_random_name();
}
private function createNetworkAndAttachToProxy()