fix: able to update ipv4 / ipv6 instance settings

This commit is contained in:
Andras Bacsai
2024-10-21 14:26:34 +02:00
parent 8eac7c209a
commit 28667a32c1
2 changed files with 14 additions and 1 deletions

View File

@@ -42,6 +42,8 @@ class Index extends Component
'settings.instance_name' => 'nullable', 'settings.instance_name' => 'nullable',
'settings.allowed_ips' => 'nullable', 'settings.allowed_ips' => 'nullable',
'settings.is_auto_update_enabled' => 'boolean', 'settings.is_auto_update_enabled' => 'boolean',
'settings.public_ipv4' => 'nullable',
'settings.public_ipv6' => 'nullable',
'auto_update_frequency' => 'string', 'auto_update_frequency' => 'string',
'update_check_frequency' => 'string', 'update_check_frequency' => 'string',
'settings.instance_timezone' => 'required|string|timezone', 'settings.instance_timezone' => 'required|string|timezone',
@@ -55,6 +57,8 @@ class Index extends Component
'settings.custom_dns_servers' => 'Custom DNS servers', 'settings.custom_dns_servers' => 'Custom DNS servers',
'settings.allowed_ips' => 'Allowed IPs', 'settings.allowed_ips' => 'Allowed IPs',
'settings.is_auto_update_enabled' => 'Auto Update Enabled', 'settings.is_auto_update_enabled' => 'Auto Update Enabled',
'settings.public_ipv4' => 'IPv4',
'settings.public_ipv6' => 'IPv6',
'auto_update_frequency' => 'Auto Update Frequency', 'auto_update_frequency' => 'Auto Update Frequency',
'update_check_frequency' => 'Update Check Frequency', 'update_check_frequency' => 'Update Check Frequency',
'settings.instance_timezone' => 'Instance Timezone', 'settings.instance_timezone' => 'Instance Timezone',
@@ -64,6 +68,7 @@ class Index extends Component
{ {
if (isInstanceAdmin()) { if (isInstanceAdmin()) {
$this->settings = instanceSettings(); $this->settings = instanceSettings();
loggy($this->settings);
$this->do_not_track = $this->settings->do_not_track; $this->do_not_track = $this->settings->do_not_track;
$this->is_auto_update_enabled = $this->settings->is_auto_update_enabled; $this->is_auto_update_enabled = $this->settings->is_auto_update_enabled;
$this->is_registration_enabled = $this->settings->is_registration_enabled; $this->is_registration_enabled = $this->settings->is_registration_enabled;

View File

@@ -66,8 +66,16 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<div class="flex gap-2">
<x-forms.input id="settings.public_ipv4" type="password" label="Instance's IPv4"
helper="Enter the IPv4 address of the instance.<br><br>It is useful if you have several IPv4 addresses and Coolify could not detect the correct one."
placeholder="1.2.3.4" />
<x-forms.input id="settings.public_ipv6" type="password" label="Instance's IPv6"
helper="Enter the IPv6 address of the instance.<br><br>It is useful if you have several IPv6 addresses and Coolify could not detect the correct one."
placeholder="2001:db8::1" />
</div>
<h4 class="w-full pt-6">DNS Validation</h4> <h4 class="w-full pt-6">DNS Validation</h4>
<div class="md:w-96"> <div class="md:w-96">
<x-forms.checkbox instantSave id="is_dns_validation_enabled" label="Enabled" /> <x-forms.checkbox instantSave id="is_dns_validation_enabled" label="Enabled" />