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