diff --git a/app/Livewire/Project/Database/Mariadb/General.php b/app/Livewire/Project/Database/Mariadb/General.php index b0c4f5d3e..06dffdc22 100644 --- a/app/Livewire/Project/Database/Mariadb/General.php +++ b/app/Livewire/Project/Database/Mariadb/General.php @@ -143,7 +143,6 @@ class General extends Component public function instantSaveSSL() { try { - $this->database->enable_ssl = $this->database->enable_ssl; $this->database->save(); $this->dispatch('success', 'SSL configuration updated.'); } catch (Exception $e) { diff --git a/app/Livewire/Project/Database/Mongodb/General.php b/app/Livewire/Project/Database/Mongodb/General.php index 28be1c69d..282547283 100644 --- a/app/Livewire/Project/Database/Mongodb/General.php +++ b/app/Livewire/Project/Database/Mongodb/General.php @@ -143,11 +143,14 @@ class General extends Component } } + public function updatedDatabaseSslMode() + { + $this->instantSaveSSL(); + } + public function instantSaveSSL() { try { - $this->database->enable_ssl = $this->database->enable_ssl; - $this->database->ssl_mode = $this->database->ssl_mode; $this->database->save(); $this->dispatch('success', 'SSL configuration updated.'); } catch (Exception $e) { diff --git a/app/Livewire/Project/Database/Mysql/General.php b/app/Livewire/Project/Database/Mysql/General.php index 3e164d885..c9424b506 100644 --- a/app/Livewire/Project/Database/Mysql/General.php +++ b/app/Livewire/Project/Database/Mysql/General.php @@ -142,11 +142,14 @@ class General extends Component } } + public function updatedDatabaseSslMode() + { + $this->instantSaveSSL(); + } + public function instantSaveSSL() { try { - $this->database->enable_ssl = $this->database->enable_ssl; - $this->database->ssl_mode = $this->database->ssl_mode; $this->database->save(); $this->dispatch('success', 'SSL configuration updated.'); } catch (Exception $e) { diff --git a/app/Livewire/Project/Database/Postgresql/General.php b/app/Livewire/Project/Database/Postgresql/General.php index 881c74d53..3057f5316 100644 --- a/app/Livewire/Project/Database/Postgresql/General.php +++ b/app/Livewire/Project/Database/Postgresql/General.php @@ -106,11 +106,14 @@ class General extends Component } } + public function updatedDatabaseSslMode() + { + $this->instantSaveSSL(); + } + public function instantSaveSSL() { try { - $this->database->enable_ssl = $this->database->enable_ssl; - $this->database->ssl_mode = $this->database->ssl_mode; $this->database->save(); $this->dispatch('success', 'SSL configuration updated.'); } catch (Exception $e) { diff --git a/app/Livewire/Project/Database/Redis/General.php b/app/Livewire/Project/Database/Redis/General.php index a3916277d..16519e287 100644 --- a/app/Livewire/Project/Database/Redis/General.php +++ b/app/Livewire/Project/Database/Redis/General.php @@ -151,7 +151,6 @@ class General extends Component public function instantSaveSSL() { try { - $this->database->enable_ssl = $this->database->enable_ssl; $this->database->save(); $this->dispatch('success', 'SSL configuration updated.'); } catch (Exception $e) { diff --git a/app/View/Components/Forms/Select.php b/app/View/Components/Forms/Select.php index 86ae866c8..b75cedaae 100644 --- a/app/View/Components/Forms/Select.php +++ b/app/View/Components/Forms/Select.php @@ -18,7 +18,7 @@ class Select extends Component public ?string $label = null, public ?string $helper = null, public bool $required = false, - public string $defaultClass = 'select' + public string $defaultClass = 'select w-full' ) { // } diff --git a/resources/views/components/forms/copy-button.blade.php b/resources/views/components/forms/copy-button.blade.php index 2e5f64c1a..5ed41fe1a 100644 --- a/resources/views/components/forms/copy-button.blade.php +++ b/resources/views/components/forms/copy-button.blade.php @@ -2,9 +2,13 @@
-
- - @if($database->enable_ssl) - - - - - - + + @if ($database->enable_ssl) +
+ + + + + + +
@endif
diff --git a/resources/views/livewire/project/database/postgresql/general.blade.php b/resources/views/livewire/project/database/postgresql/general.blade.php index e396b59c4..b90836ce8 100644 --- a/resources/views/livewire/project/database/postgresql/general.blade.php +++ b/resources/views/livewire/project/database/postgresql/general.blade.php @@ -77,42 +77,45 @@

SSL Configuration

- @if($database->enable_ssl && $certificateValidUntil) - + @if ($database->enable_ssl && $certificateValidUntil) + @endif
- @if($database->enable_ssl && $certificateValidUntil) - Valid until: - @if(now()->gt($certificateValidUntil)) - {{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired - @elseif(now()->addDays(30)->gt($certificateValidUntil)) - {{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring soon - @else - {{ $certificateValidUntil->format('d.m.Y H:i:s') }} - @endif + @if ($database->enable_ssl && $certificateValidUntil) + Valid until: + @if (now()->gt($certificateValidUntil)) + {{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired + @elseif(now()->addDays(30)->gt($certificateValidUntil)) + {{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring + soon + @else + {{ $certificateValidUntil->format('d.m.Y H:i:s') }} + @endif @endif
- - @if($database->enable_ssl) - - - - - - - + + @if ($database->enable_ssl) +
+ + + + + + + +
@endif
@@ -159,7 +162,8 @@

Initialization scripts

- +