From 92828b22fa02de4fe4a8d640d2f217d6a667d885 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 27 May 2024 15:10:41 +0200 Subject: [PATCH 1/3] chore: Update Sentry release version to 4.0.0-beta.288 --- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/sentry.php b/config/sentry.php index ee9bf2b80..cc1636425 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.287', + 'release' => '4.0.0-beta.288', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index d6123be0a..6ac4f2ce3 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Mon, 27 May 2024 15:11:00 +0200 Subject: [PATCH 2/3] fix: do not allow service storage mount point modifications --- app/Livewire/Project/Shared/Storages/Show.php | 2 ++ .../project/shared/storages/all.blade.php | 5 +++-- .../project/shared/storages/show.blade.php | 20 +++++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/app/Livewire/Project/Shared/Storages/Show.php b/app/Livewire/Project/Shared/Storages/Show.php index 5e35b796a..283930174 100644 --- a/app/Livewire/Project/Shared/Storages/Show.php +++ b/app/Livewire/Project/Shared/Storages/Show.php @@ -12,6 +12,8 @@ class Show extends Component public bool $isReadOnly = false; public ?string $modalId = null; public bool $isFirst = true; + public bool $isService = false; + public ?string $startedAt = null; protected $rules = [ 'storage.name' => 'required|string', diff --git a/resources/views/livewire/project/shared/storages/all.blade.php b/resources/views/livewire/project/shared/storages/all.blade.php index 3647a8b9d..e357b4f94 100644 --- a/resources/views/livewire/project/shared/storages/all.blade.php +++ b/resources/views/livewire/project/shared/storages/all.blade.php @@ -3,10 +3,11 @@ @foreach ($resource->persistentStorages as $storage) @if ($resource->type() === 'service') + :isFirst="$loop->first" isReadOnly='true' isService='true' /> @else + isReadOnly="{{ data_get($storage, 'is_readonly') }}" + startedAt="{{ data_get($resource, 'started_at') }}" /> @endif @endforeach diff --git a/resources/views/livewire/project/shared/storages/show.blade.php b/resources/views/livewire/project/shared/storages/show.blade.php index c5c395993..a0e02c92c 100644 --- a/resources/views/livewire/project/shared/storages/show.blade.php +++ b/resources/views/livewire/project/shared/storages/show.blade.php @@ -4,23 +4,31 @@ @if ($isFirst) - - + @if ($isService || $startedAt) + + @else + + @endif + Update @else - - + + @endif @else @if ($isFirst) - + @else From e6cce350bd4363b6af39c6ef22bb39ab42de5a0f Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 28 May 2024 13:07:07 +0200 Subject: [PATCH 3/3] fix: volume adding --- app/Livewire/Project/Shared/Storages/Add.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/Livewire/Project/Shared/Storages/Add.php b/app/Livewire/Project/Shared/Storages/Add.php index 66c2cd764..156078805 100644 --- a/app/Livewire/Project/Shared/Storages/Add.php +++ b/app/Livewire/Project/Shared/Storages/Add.php @@ -16,7 +16,7 @@ class Add extends Component public string $mount_path; public ?string $host_path = null; public string $file_storage_path; - public string $file_storage_content; + public ?string $file_storage_content = null; public string $file_storage_directory_source; public string $file_storage_directory_destination; @@ -25,7 +25,7 @@ class Add extends Component 'mount_path' => 'required|string', 'host_path' => 'string|nullable', 'file_storage_path' => 'string', - 'file_storage_content' => 'string', + 'file_storage_content' => 'nullable|string', 'file_storage_directory_source' => 'string', 'file_storage_directory_destination' => 'string', ]; @@ -62,6 +62,10 @@ class Add extends Component public function submitFileStorage() { try { + $this->validate([ + 'file_storage_path' => 'string', + 'file_storage_content' => 'nullable|string', + ]); $this->file_storage_path = trim($this->file_storage_path); $this->file_storage_path = str($this->file_storage_path)->start('/')->value(); if ($this->resource->getMorphClass() === 'App\Models\Application') { @@ -86,6 +90,10 @@ class Add extends Component public function submitFileStorageDirectory() { try { + $this->validate([ + 'file_storage_directory_source' => 'string', + 'file_storage_directory_destination' => 'string', + ]); $this->file_storage_directory_source = trim($this->file_storage_directory_source); $this->file_storage_directory_source = str($this->file_storage_directory_source)->start('/')->value(); $this->file_storage_directory_destination = trim($this->file_storage_directory_destination); @@ -108,7 +116,11 @@ class Add extends Component public function submitPersistentVolume() { try { - $this->validate($this->rules); + $this->validate([ + 'name' => 'required|string', + 'mount_path' => 'required|string', + 'host_path' => 'string|nullable', + ]); $name = $this->uuid . '-' . $this->name; $this->dispatch('addNewVolume', [ 'name' => $name,