From f10b6f9c5db2aeb839891ffe4555d1290eb8975e Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 1 Jul 2026 16:45:43 +0200 Subject: [PATCH] luci-app-strongswan-swanctl: refactoring interface listen option * Remove placeholder and show the information in the detail option description as the placeholder information is not showen * Make this option optional so if nothing is selected the strongswan charon is listen to 'all' interfaces. Therefor the default selection 'wan' is also removed. * Do not offer the creation of an interface as this is not needed at this configuration page. * Fix naming for this option from 'listen' to 'interface'. This naming for this option is used in '/etc/init.d/swanctl' startup script. Signed-off-by: Florian Eckert --- .../resources/view/strongswan-swanctl/swanctl.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js b/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js index f52f374a14..d5f51fc8ea 100644 --- a/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js +++ b/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js @@ -76,13 +76,12 @@ return view.extend({ s.anonymous = true; s.addremove = true; - o = s.option(widgets.NetworkSelect, 'listen', _('Listening Interfaces'), - _('Interfaces that accept VPN traffic')); - o.datatype = 'interface'; - o.placeholder = _('Select an interface or leave empty for all interfaces'); - o.default = 'wan'; + o = s.option(widgets.NetworkSelect, 'interface', _('Listening Interfaces'), + _('Interfaces that accept VPN traffic') + '
' + + _('Select an interface or leave empty for all interfaces')); o.multiple = true; - o.rmempty = false; + o.nocreate = true; + o.optional = true; o = s.option(form.Value, 'debug', _('Debug Level'), _('Trace level: 0 is least verbose, 4 is most'));