mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 18:18:29 +00:00
Merge remote-tracking branch 'origin/next' into harden-database-import-files
This commit is contained in:
commit
7d65a4b496
550 files changed
+18078
-5008
No files matched your search
@@ -9,7 +9,6 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
class Docker extends Component
|
||||
{
|
||||
@@ -35,7 +34,7 @@ class Docker extends Component
|
||||
|
||||
public function mount(?string $server_id = null): void
|
||||
{
|
||||
$this->network = (string) new Cuid2;
|
||||
$this->network = new_public_id();
|
||||
$this->servers = Server::isUsable()->get();
|
||||
|
||||
if (filled($server_id)) {
|
||||
@@ -68,7 +67,7 @@ class Docker extends Component
|
||||
|
||||
public function generateName(): void
|
||||
{
|
||||
$name = data_get($this->selectedServer, 'name', new Cuid2);
|
||||
$name = data_get($this->selectedServer, 'name', new_public_id());
|
||||
$this->name = str("{$name}-{$this->network}")->kebab();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Livewire\Destination;
|
||||
|
||||
use App\Models\StandaloneDocker;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Livewire\Attributes\Validate;
|
||||
@@ -31,8 +32,12 @@ class Show extends Component
|
||||
if (! $destination) {
|
||||
return redirect()->route('destination.index');
|
||||
}
|
||||
$this->authorize('view', $destination);
|
||||
|
||||
$this->destination = $destination;
|
||||
$this->syncData();
|
||||
} catch (AuthorizationException) {
|
||||
abort(403);
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user