diff --git a/app/Livewire/Server/Proxy/DynamicConfigurations.php b/app/Livewire/Server/Proxy/DynamicConfigurations.php index 9e7a89780..6e52f9d4a 100644 --- a/app/Livewire/Server/Proxy/DynamicConfigurations.php +++ b/app/Livewire/Server/Proxy/DynamicConfigurations.php @@ -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); diff --git a/app/Livewire/Server/Proxy/NewDynamicConfiguration.php b/app/Livewire/Server/Proxy/NewDynamicConfiguration.php index cf9c88160..28b083ca8 100644 --- a/app/Livewire/Server/Proxy/NewDynamicConfiguration.php +++ b/app/Livewire/Server/Proxy/NewDynamicConfiguration.php @@ -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); } diff --git a/resources/views/livewire/server/proxy/dynamic-configurations.blade.php b/resources/views/livewire/server/proxy/dynamic-configurations.blade.php index 9cc1c505b..c89c4274f 100644 --- a/resources/views/livewire/server/proxy/dynamic-configurations.blade.php +++ b/resources/views/livewire/server/proxy/dynamic-configurations.blade.php @@ -44,6 +44,8 @@ class="font-normal text-white normal-case border-none rounded btn btn-primary bt @endif @endforeach + @else +