From d523becb29367b083943667c4485ecb5ced037ff Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 2 Oct 2023 09:08:41 +0200 Subject: [PATCH] fix: add uuid to volume names --- app/Http/Livewire/Project/Shared/Storages/Add.php | 4 +++- .../views/livewire/project/shared/storages/all.blade.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/Project/Shared/Storages/Add.php b/app/Http/Livewire/Project/Shared/Storages/Add.php index e7831f1cb..1edfe03a4 100644 --- a/app/Http/Livewire/Project/Shared/Storages/Add.php +++ b/app/Http/Livewire/Project/Shared/Storages/Add.php @@ -6,6 +6,7 @@ use Livewire\Component; class Add extends Component { + public $uuid; public $parameters; public string $name; public string $mount_path; @@ -31,8 +32,9 @@ class Add extends Component public function submit() { $this->validate(); + $name = $this->uuid . '-' . $this->name; $this->emitUp('submit', [ - 'name' => $this->name, + 'name' => $name, 'mount_path' => $this->mount_path, 'host_path' => $this->host_path, ]); diff --git a/resources/views/livewire/project/shared/storages/all.blade.php b/resources/views/livewire/project/shared/storages/all.blade.php index 22215f6a9..21f7a89ae 100644 --- a/resources/views/livewire/project/shared/storages/all.blade.php +++ b/resources/views/livewire/project/shared/storages/all.blade.php @@ -8,7 +8,7 @@ volume name, example: -pr-1" /> + Add - + @endif
Persistent storage to preserve data between deployments.