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, 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/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 @@ 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 diff --git a/versions.json b/versions.json index a0c7bf635..84a9c570d 100644 --- a/versions.json +++ b/versions.json @@ -1,7 +1,7 @@ { "coolify": { "v4": { - "version": "4.0.0-beta.287" + "version": "4.0.0-beta.288" }, "sentinel": { "version": "0.0.4"