refactor(database): streamline SSL configuration handling across database types
This commit is contained in:
@@ -143,7 +143,6 @@ class General extends Component
|
|||||||
public function instantSaveSSL()
|
public function instantSaveSSL()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->database->enable_ssl = $this->database->enable_ssl;
|
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'SSL configuration updated.');
|
$this->dispatch('success', 'SSL configuration updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -143,11 +143,14 @@ class General extends Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updatedDatabaseSslMode()
|
||||||
|
{
|
||||||
|
$this->instantSaveSSL();
|
||||||
|
}
|
||||||
|
|
||||||
public function instantSaveSSL()
|
public function instantSaveSSL()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->database->enable_ssl = $this->database->enable_ssl;
|
|
||||||
$this->database->ssl_mode = $this->database->ssl_mode;
|
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'SSL configuration updated.');
|
$this->dispatch('success', 'SSL configuration updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -142,11 +142,14 @@ class General extends Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updatedDatabaseSslMode()
|
||||||
|
{
|
||||||
|
$this->instantSaveSSL();
|
||||||
|
}
|
||||||
|
|
||||||
public function instantSaveSSL()
|
public function instantSaveSSL()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->database->enable_ssl = $this->database->enable_ssl;
|
|
||||||
$this->database->ssl_mode = $this->database->ssl_mode;
|
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'SSL configuration updated.');
|
$this->dispatch('success', 'SSL configuration updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -106,11 +106,14 @@ class General extends Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updatedDatabaseSslMode()
|
||||||
|
{
|
||||||
|
$this->instantSaveSSL();
|
||||||
|
}
|
||||||
|
|
||||||
public function instantSaveSSL()
|
public function instantSaveSSL()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->database->enable_ssl = $this->database->enable_ssl;
|
|
||||||
$this->database->ssl_mode = $this->database->ssl_mode;
|
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'SSL configuration updated.');
|
$this->dispatch('success', 'SSL configuration updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -151,7 +151,6 @@ class General extends Component
|
|||||||
public function instantSaveSSL()
|
public function instantSaveSSL()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->database->enable_ssl = $this->database->enable_ssl;
|
|
||||||
$this->database->save();
|
$this->database->save();
|
||||||
$this->dispatch('success', 'SSL configuration updated.');
|
$this->dispatch('success', 'SSL configuration updated.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -18,7 +18,7 @@ class Select extends Component
|
|||||||
public ?string $label = null,
|
public ?string $label = null,
|
||||||
public ?string $helper = null,
|
public ?string $helper = null,
|
||||||
public bool $required = false,
|
public bool $required = false,
|
||||||
public string $defaultClass = 'select'
|
public string $defaultClass = 'select w-full'
|
||||||
) {
|
) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
@@ -2,9 +2,13 @@
|
|||||||
|
|
||||||
<div class="relative" x-data="{ copied: false }">
|
<div class="relative" x-data="{ copied: false }">
|
||||||
<input type="text" value="{{ $text }}" readonly class="input">
|
<input type="text" value="{{ $text }}" readonly class="input">
|
||||||
<button @click="copied = true; navigator.clipboard.writeText('{{ $text }}'); setTimeout(() => copied = false, 1000)" class="absolute right-2 top-1/2 -translate-y-1/2 p-1.5 text-gray-400 hover:text-gray-300 transition-colors" title="Copy to clipboard">
|
<button
|
||||||
|
@click.prevent="copied = true; navigator.clipboard.writeText('{{ $text }}'); setTimeout(() => copied = false, 1000)"
|
||||||
|
class="absolute right-2 top-1/2 -translate-y-1/2 p-1.5 text-gray-400 hover:text-gray-300 transition-colors"
|
||||||
|
title="Copy to clipboard">
|
||||||
<svg x-show="!copied" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg x-show="!copied" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
|
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
|
||||||
</svg>
|
</svg>
|
||||||
<svg x-show="copied" class="w-5 h-5 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg x-show="copied" class="w-5 h-5 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
|
||||||
|
@@ -1,6 +1,11 @@
|
|||||||
<div class="flex flex-col items-start gap-2 min-w-fit">
|
<div class="flex flex-col items-start gap-2 min-w-fit">
|
||||||
<a wire:navigate class="menu-item {{ $activeMenu === 'general' ? 'menu-item-active' : '' }}"
|
<a wire:navigate class="menu-item {{ $activeMenu === 'general' ? 'menu-item-active' : '' }}"
|
||||||
href="{{ route('server.show', ['server_uuid' => $server->uuid]) }}">General</a>
|
href="{{ route('server.show', ['server_uuid' => $server->uuid]) }}">General</a>
|
||||||
|
@if ($server->isFunctional())
|
||||||
|
<a wire:navigate class="menu-item {{ $activeMenu === 'advanced' ? 'menu-item-active' : '' }}"
|
||||||
|
href="{{ route('server.advanced', ['server_uuid' => $server->uuid]) }}">Advanced
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
<a wire:navigate class="menu-item {{ $activeMenu === 'private-key' ? 'menu-item-active' : '' }}"
|
<a wire:navigate class="menu-item {{ $activeMenu === 'private-key' ? 'menu-item-active' : '' }}"
|
||||||
href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">Private Key
|
href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">Private Key
|
||||||
</a>
|
</a>
|
||||||
@@ -16,9 +21,6 @@
|
|||||||
<a wire:navigate class="menu-item {{ $activeMenu === 'destinations' ? 'menu-item-active' : '' }}"
|
<a wire:navigate class="menu-item {{ $activeMenu === 'destinations' ? 'menu-item-active' : '' }}"
|
||||||
href="{{ route('server.destinations', ['server_uuid' => $server->uuid]) }}">Destinations
|
href="{{ route('server.destinations', ['server_uuid' => $server->uuid]) }}">Destinations
|
||||||
</a>
|
</a>
|
||||||
<a wire:navigate class="menu-item {{ $activeMenu === 'advanced' ? 'menu-item-active' : '' }}"
|
|
||||||
href="{{ route('server.advanced', ['server_uuid' => $server->uuid]) }}">Advanced
|
|
||||||
</a>
|
|
||||||
<a wire:navigate class="menu-item {{ $activeMenu === 'log-drains' ? 'menu-item-active' : '' }}"
|
<a wire:navigate class="menu-item {{ $activeMenu === 'log-drains' ? 'menu-item-active' : '' }}"
|
||||||
href="{{ route('server.log-drains', ['server_uuid' => $server->uuid]) }}">Log
|
href="{{ route('server.log-drains', ['server_uuid' => $server->uuid]) }}">Log
|
||||||
Drains</a>
|
Drains</a>
|
||||||
|
@@ -53,34 +53,31 @@
|
|||||||
<div class="flex items-center justify-between py-2">
|
<div class="flex items-center justify-between py-2">
|
||||||
<div class="flex items-center justify-between w-full">
|
<div class="flex items-center justify-between w-full">
|
||||||
<h3>SSL Configuration</h3>
|
<h3>SSL Configuration</h3>
|
||||||
@if($database->enable_ssl && $certificateValidUntil)
|
@if ($database->enable_ssl && $certificateValidUntil)
|
||||||
<x-modal-confirmation
|
<x-modal-confirmation title="Regenerate SSL Certificates"
|
||||||
title="Regenerate SSL Certificates"
|
buttonTitle="Regenerate SSL Certificates" :actions="[
|
||||||
buttonTitle="Regenerate SSL Certificates"
|
|
||||||
:actions="[
|
|
||||||
'The SSL certificate of this database will be regenerated.',
|
'The SSL certificate of this database will be regenerated.',
|
||||||
'You must restart the database after regenerating the certificate to start using the new certificate.'
|
'You must restart the database after regenerating the certificate to start using the new certificate.',
|
||||||
]"
|
]"
|
||||||
submitAction="regenerateSslCertificate"
|
submitAction="regenerateSslCertificate" :confirmWithText="false" :confirmWithPassword="false" />
|
||||||
:confirmWithText="false"
|
|
||||||
:confirmWithPassword="false"
|
|
||||||
/>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if($database->enable_ssl && $certificateValidUntil)
|
@if ($database->enable_ssl && $certificateValidUntil)
|
||||||
<span class="text-sm">Valid until:
|
<span class="text-sm">Valid until:
|
||||||
@if(now()->gt($certificateValidUntil))
|
@if (now()->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
||||||
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring soon</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring
|
||||||
@else
|
soon</span>
|
||||||
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
@else
|
||||||
@endif
|
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
||||||
|
@endif
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<x-forms.checkbox id="enable_ssl" label="Enable SSL" wire:model.live="enable_ssl" instantSave="instantSaveSSL" />
|
<x-forms.checkbox id="enable_ssl" label="Enable SSL" wire:model.live="enable_ssl"
|
||||||
|
instantSave="instantSaveSSL" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@@ -60,43 +60,44 @@
|
|||||||
<div class="flex items-center justify-between py-2">
|
<div class="flex items-center justify-between py-2">
|
||||||
<div class="flex items-center justify-between w-full">
|
<div class="flex items-center justify-between w-full">
|
||||||
<h3>SSL Configuration</h3>
|
<h3>SSL Configuration</h3>
|
||||||
@if($database->enable_ssl)
|
@if ($database->enable_ssl)
|
||||||
<x-modal-confirmation
|
<x-modal-confirmation title="Regenerate SSL Certificates"
|
||||||
title="Regenerate SSL Certificates"
|
buttonTitle="Regenerate SSL Certificates" :actions="[
|
||||||
buttonTitle="Regenerate SSL Certificates"
|
'The SSL certificate of this database will be regenerated.',
|
||||||
:actions="['The SSL certificate of this database will be regenerated.','You must restart the database after regenerating the certificate to start using the new certificate.']"
|
'You must restart the database after regenerating the certificate to start using the new certificate.',
|
||||||
submitAction="regenerateSslCertificate"
|
]"
|
||||||
:confirmWithText="false"
|
submitAction="regenerateSslCertificate" :confirmWithText="false" :confirmWithPassword="false" />
|
||||||
:confirmWithPassword="false"
|
|
||||||
/>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if($database->enable_ssl && $certificateValidUntil)
|
@if ($database->enable_ssl && $certificateValidUntil)
|
||||||
<span class="text-sm">Valid until:
|
<span class="text-sm">Valid until:
|
||||||
@if(now()->gt($certificateValidUntil))
|
@if (now()->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
||||||
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring soon</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring
|
||||||
@else
|
soon</span>
|
||||||
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
@else
|
||||||
@endif
|
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
||||||
|
@endif
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<x-forms.checkbox id="database.enable_ssl" label="Enable SSL"
|
<x-forms.checkbox id="database.enable_ssl" label="Enable SSL" wire:model.live="database.enable_ssl"
|
||||||
wire:model.live="database.enable_ssl" instantSave="instantSaveSSL" />
|
instantSave="instantSaveSSL" />
|
||||||
@if($database->enable_ssl)
|
@if ($database->enable_ssl)
|
||||||
<x-forms.select id="database.ssl_mode" label="SSL Mode"
|
<div class="mx-2">
|
||||||
wire:model.live="database.ssl_mode" instantSave="instantSaveSSL"
|
<x-forms.select id="database.ssl_mode" label="SSL Mode" wire:model.live="database.ssl_mode"
|
||||||
helper="Choose the SSL verification mode for MongoDB connections">
|
instantSave="instantSaveSSL"
|
||||||
<option value="allow">allow</option>
|
helper="Choose the SSL verification mode for MongoDB connections">
|
||||||
<option value="prefer">prefer</option>
|
<option value="allow" title="Allow insecure connections">allow (insecure)</option>
|
||||||
<option value="require">require</option>
|
<option value="prefer" title="Prefer secure connections">prefer (secure)</option>
|
||||||
<option value="verify-full">verify-full</option>
|
<option value="require" title="Require secure connections">require (secure)</option>
|
||||||
</x-forms.select>
|
<option value="verify-full" title="Verify full certificate">verify-full (secure)</option>
|
||||||
|
</x-forms.select>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -70,41 +70,45 @@
|
|||||||
<div class="flex items-center justify-between py-2">
|
<div class="flex items-center justify-between py-2">
|
||||||
<div class="flex items-center justify-between w-full">
|
<div class="flex items-center justify-between w-full">
|
||||||
<h3>SSL Configuration</h3>
|
<h3>SSL Configuration</h3>
|
||||||
@if($database->enable_ssl && $certificateValidUntil)
|
@if ($database->enable_ssl && $certificateValidUntil)
|
||||||
<x-modal-confirmation
|
<x-modal-confirmation title="Regenerate SSL Certificates"
|
||||||
title="Regenerate SSL Certificates"
|
buttonTitle="Regenerate SSL Certificates" :actions="[
|
||||||
buttonTitle="Regenerate SSL Certificates"
|
'The SSL certificate of this database will be regenerated.',
|
||||||
:actions="['The SSL certificate of this database will be regenerated.','You must restart the database after regenerating the certificate to start using the new certificate.']"
|
'You must restart the database after regenerating the certificate to start using the new certificate.',
|
||||||
submitAction="regenerateSslCertificate"
|
]"
|
||||||
:confirmWithText="false"
|
submitAction="regenerateSslCertificate" :confirmWithText="false" :confirmWithPassword="false" />
|
||||||
:confirmWithPassword="false"
|
|
||||||
/>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if($database->enable_ssl && $certificateValidUntil)
|
@if ($database->enable_ssl && $certificateValidUntil)
|
||||||
<span class="text-sm">Valid until:
|
<span class="text-sm">Valid until:
|
||||||
@if(now()->gt($certificateValidUntil))
|
@if (now()->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
||||||
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring soon</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring
|
||||||
@else
|
soon</span>
|
||||||
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
@else
|
||||||
@endif
|
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
||||||
|
@endif
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<x-forms.checkbox id="database.enable_ssl" label="Enable SSL" wire:model.live="database.enable_ssl" instantSave="instantSaveSSL" />
|
<x-forms.checkbox id="database.enable_ssl" label="Enable SSL" wire:model.live="database.enable_ssl"
|
||||||
@if($database->enable_ssl)
|
instantSave="instantSaveSSL" />
|
||||||
<x-forms.select id="database.ssl_mode" label="SSL Mode" wire:model.live="database.ssl_mode" instantSave="instantSaveSSL"
|
@if ($database->enable_ssl)
|
||||||
helper="Choose the SSL verification mode for MySQL connections">
|
<div class="mx-2">
|
||||||
<option value="PREFERRED">PREFERRED</option>
|
<x-forms.select id="database.ssl_mode" label="SSL Mode" wire:model.live="database.ssl_mode"
|
||||||
<option value="REQUIRED">REQUIRED</option>
|
instantSave="instantSaveSSL"
|
||||||
<option value="VERIFY_CA">VERIFY_CA</option>
|
helper="Choose the SSL verification mode for MySQL connections">
|
||||||
<option value="VERIFY_IDENTITY">VERIFY_IDENTITY</option>
|
<option value="PREFERRED" title="Prefer secure connections">Prefer (secure)</option>
|
||||||
</x-forms.select>
|
<option value="REQUIRED" title="Require secure connections">Require (secure)</option>
|
||||||
|
<option value="VERIFY_CA" title="Verify CA certificate">Verify CA (secure)</option>
|
||||||
|
<option value="VERIFY_IDENTITY" title="Verify full certificate">Verify Full (secure)
|
||||||
|
</option>
|
||||||
|
</x-forms.select>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -77,42 +77,45 @@
|
|||||||
<div class="flex items-center justify-between py-2">
|
<div class="flex items-center justify-between py-2">
|
||||||
<div class="flex items-center justify-between w-full">
|
<div class="flex items-center justify-between w-full">
|
||||||
<h3>SSL Configuration</h3>
|
<h3>SSL Configuration</h3>
|
||||||
@if($database->enable_ssl && $certificateValidUntil)
|
@if ($database->enable_ssl && $certificateValidUntil)
|
||||||
<x-modal-confirmation
|
<x-modal-confirmation title="Regenerate SSL Certificates"
|
||||||
title="Regenerate SSL Certificates"
|
buttonTitle="Regenerate SSL Certificates" :actions="[
|
||||||
buttonTitle="Regenerate SSL Certificates"
|
'The SSL certificate of this database will be regenerated.',
|
||||||
:actions="['The SSL certificate of this database will be regenerated.','You must restart the database after regenerating the certificate to start using the new certificate.']"
|
'You must restart the database after regenerating the certificate to start using the new certificate.',
|
||||||
submitAction="regenerateSslCertificate"
|
]"
|
||||||
:confirmWithText="false"
|
submitAction="regenerateSslCertificate" :confirmWithText="false" :confirmWithPassword="false" />
|
||||||
:confirmWithPassword="false"
|
|
||||||
/>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if($database->enable_ssl && $certificateValidUntil)
|
@if ($database->enable_ssl && $certificateValidUntil)
|
||||||
<span class="text-sm">Valid until:
|
<span class="text-sm">Valid until:
|
||||||
@if(now()->gt($certificateValidUntil))
|
@if (now()->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expired</span>
|
||||||
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
@elseif(now()->addDays(30)->gt($certificateValidUntil))
|
||||||
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring soon</span>
|
<span class="text-red-500">{{ $certificateValidUntil->format('d.m.Y H:i:s') }} - Expiring
|
||||||
@else
|
soon</span>
|
||||||
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
@else
|
||||||
@endif
|
<span>{{ $certificateValidUntil->format('d.m.Y H:i:s') }}</span>
|
||||||
|
@endif
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<x-forms.checkbox id="database.enable_ssl" label="Enable SSL" wire:model.live="database.enable_ssl" instantSave="instantSaveSSL" />
|
<x-forms.checkbox id="database.enable_ssl" label="Enable SSL" wire:model.live="database.enable_ssl"
|
||||||
@if($database->enable_ssl)
|
instantSave="instantSaveSSL" />
|
||||||
<x-forms.select id="database.ssl_mode" label="SSL Mode" wire:model.live="database.ssl_mode" instantSave="instantSaveSSL"
|
@if ($database->enable_ssl)
|
||||||
helper="Choose the SSL verification mode for PostgreSQL connections">
|
<div class="mx-2">
|
||||||
<option value="allow">allow</option>
|
<x-forms.select id="database.ssl_mode" label="SSL Mode" wire:model.live="database.ssl_mode"
|
||||||
<option value="prefer">prefer</option>
|
instantSave="instantSaveSSL"
|
||||||
<option value="require">require</option>
|
helper="Choose the SSL verification mode for PostgreSQL connections">
|
||||||
<option value="verify-ca">verify-ca</option>
|
<option value="allow" title="Allow insecure connections">allow (insecure)</option>
|
||||||
<option value="verify-full">verify-full</option>
|
<option value="prefer" title="Prefer secure connections">prefer (secure)</option>
|
||||||
</x-forms.select>
|
<option value="require" title="Require secure connections">require (secure)</option>
|
||||||
|
<option value="verify-ca" title="Verify CA certificate">verify-ca (secure)</option>
|
||||||
|
<option value="verify-full" title="Verify full certificate">verify-full (secure)</option>
|
||||||
|
</x-forms.select>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -159,7 +162,8 @@
|
|||||||
<h3>Initialization scripts</h3>
|
<h3>Initialization scripts</h3>
|
||||||
<x-modal-input buttonTitle="+ Add" title="New Init Script">
|
<x-modal-input buttonTitle="+ Add" title="New Init Script">
|
||||||
<form class="flex flex-col w-full gap-2 rounded" wire:submit='save_new_init_script'>
|
<form class="flex flex-col w-full gap-2 rounded" wire:submit='save_new_init_script'>
|
||||||
<x-forms.input placeholder="create_test_db.sql" id="new_filename" label="Filename" required />
|
<x-forms.input placeholder="create_test_db.sql" id="new_filename" label="Filename"
|
||||||
|
required />
|
||||||
<x-forms.textarea rows="20" placeholder="CREATE DATABASE test;" id="new_content"
|
<x-forms.textarea rows="20" placeholder="CREATE DATABASE test;" id="new_content"
|
||||||
label="Content" required />
|
label="Content" required />
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
|
Reference in New Issue
Block a user