From cb05b628faf1f582743f336aa15dada720cba86f Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Sat, 26 Oct 2024 10:44:53 +0200 Subject: [PATCH] Update the DNS setting to be a mandatory configuration ... (#1839) ... for both Ethernet and WiFi network interfaces when a gateway is set. There are simply too many posts in the forum that are due to users not configuring the DNS server when configuring static IP. Signed-off-by: Volker Theile --- deb/openmediavault/debian/changelog | 2 ++ .../interface-ethernet-form-page.component.ts | 15 ++++++++++++++- .../interface-wifi-form-page.component.ts | 15 ++++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/deb/openmediavault/debian/changelog b/deb/openmediavault/debian/changelog index 7bb67f41a4c..97e1071422d 100644 --- a/deb/openmediavault/debian/changelog +++ b/deb/openmediavault/debian/changelog @@ -1,6 +1,8 @@ openmediavault (7.4.11-1) stable; urgency=low * Several improvements. + * Update the DNS setting to be a mandatory configuration for + both Ethernet and WiFi network interfaces. * Issue #1835: Unlink mount directory only if empty. -- Volker Theile Sat, 12 Oct 2024 12:13:43 +0200 diff --git a/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-ethernet-form-page.component.ts b/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-ethernet-form-page.component.ts index eb14b498560..0b5bec9099f 100644 --- a/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-ethernet-form-page.component.ts +++ b/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-ethernet-form-page.component.ts @@ -297,7 +297,20 @@ export class InterfaceEthernetFormPageComponent extends BaseFormPageComponent { hint: gettext('IP addresses of domain name servers used to resolve host names.'), value: '', validators: { - patternType: 'ipList' + patternType: 'ipList', + requiredIf: { + operator: 'or', + arg0: { + operator: 'and', + arg0: { operator: 'eq', arg0: { prop: 'method' }, arg1: 'static' }, + arg1: { operator: 'n', arg0: { prop: 'gateway' } } + }, + arg1: { + operator: 'and', + arg0: { operator: 'eq', arg0: { prop: 'method6' }, arg1: 'static' }, + arg1: { operator: 'n', arg0: { prop: 'gateway6' } } + } + } } }, { diff --git a/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-wifi-form-page.component.ts b/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-wifi-form-page.component.ts index d3da2419e29..83a84c7bf01 100644 --- a/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-wifi-form-page.component.ts +++ b/deb/openmediavault/workbench/src/app/pages/network/interfaces/interface-wifi-form-page.component.ts @@ -338,7 +338,20 @@ export class InterfaceWifiFormPageComponent extends BaseFormPageComponent { hint: gettext('IP addresses of domain name servers used to resolve host names.'), value: '', validators: { - patternType: 'ipList' + patternType: 'ipList', + requiredIf: { + operator: 'or', + arg0: { + operator: 'and', + arg0: { operator: 'eq', arg0: { prop: 'method' }, arg1: 'static' }, + arg1: { operator: 'n', arg0: { prop: 'gateway' } } + }, + arg1: { + operator: 'and', + arg0: { operator: 'eq', arg0: { prop: 'method6' }, arg1: 'static' }, + arg1: { operator: 'n', arg0: { prop: 'gateway6' } } + } + } } }, {