Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: add uuid to volume names

Andras Bacsaid523becb2936
diff --git a/app/Http/Livewire/Project/Shared/Storages/Add.php b/app/Http/Livewire/Project/Shared/Storages/Add.php
index e7831f1cb2..1edfe03a4f 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 22215f6a93..21f7a89ae5 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: <span class='text-helper'>-pr-1</span>" />
<x-forms.button class="btn" onclick="newStorage.showModal()">+ Add</x-forms.button>
- <livewire:project.shared.storages.add />
+ <livewire:project.shared.storages.add :uuid="$resource->uuid" />
@endif
</div>
<div>Persistent storage to preserve data between deployments.</div>