commit
6a058372bb
@ -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 @@ public function mount()
|
||||
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 @@ public function submitFileStorage()
|
||||
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 @@ public function submitFileStorageDirectory()
|
||||
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,
|
||||
|
@ -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',
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
// 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'),
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.287';
|
||||
return '4.0.0-beta.288';
|
||||
|
@ -3,10 +3,11 @@
|
||||
@foreach ($resource->persistentStorages as $storage)
|
||||
@if ($resource->type() === 'service')
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage"
|
||||
:isFirst="$loop->first" isReadOnly='true' />
|
||||
:isFirst="$loop->first" isReadOnly='true' isService='true' />
|
||||
@else
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage"
|
||||
isReadOnly="{{ data_get($storage, 'is_readonly') }}" />
|
||||
isReadOnly="{{ data_get($storage, 'is_readonly') }}"
|
||||
startedAt="{{ data_get($resource, 'started_at') }}" />
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
@ -4,23 +4,31 @@
|
||||
@if ($isFirst)
|
||||
<x-forms.input id="storage.name" label="Volume Name" required
|
||||
helper="Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||
<x-forms.input id="storage.host_path" helper="Directory on the host system." label="Source Path"
|
||||
helper="Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" helper="Directory inside the container." required readonly />
|
||||
@if ($isService || $startedAt)
|
||||
<x-forms.input id="storage.host_path" readonly helper="Directory on the host system."
|
||||
label="Source Path"
|
||||
helper="Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||
@else
|
||||
<x-forms.input id="storage.host_path" helper="Directory on the host system." label="Source Path"
|
||||
helper="Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||
@endif
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" helper="Directory inside the container."
|
||||
required readonly />
|
||||
<x-forms.button type="submit">
|
||||
Update
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.input id="storage.name" required readonly
|
||||
helper="Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||
<x-forms.input id="storage.host_path" helper="Directory on the host system." readonly />
|
||||
<x-forms.input id="storage.mount_path" helper="Directory inside the container." required readonly />
|
||||
<x-forms.input id="storage.host_path" helper="Directory on the host system." readonly />
|
||||
<x-forms.input id="storage.mount_path" helper="Directory inside the container." required readonly />
|
||||
@endif
|
||||
@else
|
||||
@if ($isFirst)
|
||||
<x-forms.input id="storage.name" label="Volume Name" required />
|
||||
<x-forms.input id="storage.host_path" helper="Directory on the host system." label="Source Path" />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" helper="Directory inside the container." required />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" helper="Directory inside the container."
|
||||
required />
|
||||
@else
|
||||
<x-forms.input id="storage.name" required />
|
||||
<x-forms.input id="storage.host_path" helper="Directory on the host system." />
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"coolify": {
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.287"
|
||||
"version": "4.0.0-beta.288"
|
||||
},
|
||||
"sentinel": {
|
||||
"version": "0.0.4"
|
||||
|
Loading…
Reference in New Issue
Block a user