fix: no coolify.yaml found
This commit is contained in:
parent
7233c86f3d
commit
836458ad85
@ -22,7 +22,9 @@ public function loadDynamicConfigurations()
|
||||
$files = collect(explode("\n", $files))->filter(fn ($file) => !empty($file));
|
||||
$files = $files->map(fn ($file) => trim($file));
|
||||
$files = $files->sort();
|
||||
$files = $files->filter(fn ($file) => $file !== 'coolify.yaml')->prepend('coolify.yaml');
|
||||
if ($files->contains('coolify.yaml')) {
|
||||
$files = $files->filter(fn ($file) => $file !== 'coolify.yaml')->prepend('coolify.yaml');
|
||||
}
|
||||
$contents = collect([]);
|
||||
foreach ($files as $file) {
|
||||
$without_extension = str_replace('.', '|', $file);
|
||||
|
@ -62,6 +62,7 @@ public function addDynamicConfiguration()
|
||||
instant_remote_process(["echo '{$base64_value}' | base64 -d > {$file}"], $this->server);
|
||||
$this->dispatch('loadDynamicConfigurations');
|
||||
$this->dispatch('dynamic-configuration-added');
|
||||
$this->dispatch('success', 'Success', 'Dynamic configuration saved.');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ class="font-normal text-white normal-case border-none rounded btn btn-primary bt
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div wire:loading.remove> No dynamic configurations found.</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user