Skip to content

Commit 810488b

Browse files
committed
fix: volume detection (dir or file) is fixed
1 parent b227614 commit 810488b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/Models/LocalFileVolume.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ public function saveStorageOnServer()
7979
$isFile = instant_remote_process(["test -f $path && echo OK || echo NOK"], $server);
8080
$isDir = instant_remote_process(["test -d $path && echo OK || echo NOK"], $server);
8181
if ($isFile == 'OK' && $fileVolume->is_directory) {
82+
$fileVolume->is_directory = false;
83+
$fileVolume->save();
8284
throw new \Exception('The following file is a file on the server, but you are trying to mark it as a directory. Please delete the file on the server or mark it as directory.');
8385
} elseif ($isDir == 'OK' && ! $fileVolume->is_directory) {
86+
$fileVolume->is_directory = true;
87+
$fileVolume->save();
8488
throw new \Exception('The following file is a directory on the server, but you are trying to mark it as a file. <br><br>Please delete the directory on the server or mark it as directory.');
8589
}
8690
if (! $fileVolume->is_directory && $isDir == 'NOK') {

resources/views/livewire/project/service/configuration.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ class="w-4 h-4 dark:text-warning text-coollabs"
175175
<div class="pb-4 dark:text-warning text-coollabs">If you would like to add a volume, you must add it to
176176
your compose file (General tab).</div>
177177
@foreach ($applications as $application)
178-
<livewire:project.service.storage wire:key="application-{{ $application->id }}"
179-
:resource="$application" />
178+
<livewire:project.service.storage wire:key="application-{{ $application->id }}" :resource="$application"
179+
lazy />
180180
@endforeach
181181
@foreach ($databases as $database)
182-
<livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" />
182+
<livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" lazy />
183183
@endforeach
184184
</div>
185185
<div x-cloak x-show="activeTab === 'scheduled-tasks'">
186-
<livewire:project.shared.scheduled-task.all :resource="$service" />
186+
<livewire:project.shared.scheduled-task.all :resource="$service" lazy />
187187
</div>
188188
<div x-cloak x-show="activeTab === 'webhooks'">
189189
<livewire:project.shared.webhooks :resource="$service" />

0 commit comments

Comments
 (0)