Skip to content

Commit

Permalink
feat: Add DNS server running check and disabled dns toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Jul 30, 2024
1 parent 9798989 commit ef34339
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/public/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
"dhcp-server_invalid_type": "Number required",
"dhcp-server_number_gte": "Enter a positive number",
"dns-server_format": "IPv4 format required",
"dns-server_number_one_of": "IPv4 or IPv6 required"
"dns-server_number_one_of": "IPv4 or IPv6 required",
"dns_server_is_running": "A DNS server is running",
"dns_server_is_running_description": "You cannot configure the dns feature if a DNS server is already running on this node. A module like samba, dnsmasq or another dnsmasq instance may be using the DNS port."
},
"dns_records": {
"title": "DNS records",
Expand Down
13 changes: 13 additions & 0 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,22 @@
<div class="title-description mg-bottom-xlg">
{{ $t("settings.DNS_description") }}
</div>
<cv-row v-if="are_dns_bound && !is_configured">
<cv-column>
<NsInlineNotification
kind="info"
:title="$t('settings.dns_server_is_running')"
:description="$t('settings.dns_server_is_running_description')"
:showCloseButton="false"
/>
</cv-column>
</cv-row>
<NsToggle
:label="$t('settings.DNS_enable_label')"
v-model="dnsEnableField"
value="dnsEnableField"
formItem
:disabled="are_dns_bound && !is_configured"
ref="dnsEnableField"
>
<template slot="text-left">{{
Expand Down Expand Up @@ -250,6 +261,8 @@ export default {
dhcpStartField: "",
dhcpEndField: "",
dhcpLeaseField: 12,
are_dns_bound: false,
is_configured: false,
dnsEnableField: false,
dnsPrimaryField: "",
dnsSecondaryField: "",
Expand Down

0 comments on commit ef34339

Please sign in to comment.