summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
diff options
context:
space:
mode:
authorAlexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>2022-05-05 01:18:51 +0300
committerAlexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>2022-05-06 00:08:18 +0300
commit24ac5a2bf6d713c6878cf7be7d4e4516965c2884 (patch)
tree6dc1931bf9ece541728dc23471185297cd81a123 /modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
parent111c551cdb8d14e8e5ef7c7a66ffdceb6d3cbb55 (diff)
luci-mod-system: add interface selection for NTPD
UCI option `interface` for sysntpd server was introduced in OpenWrt commit 4da60500ebd2. NTP server binds to the specified interface, or if unspecified, to all. This patch adds selection widget to LuCI. Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
index 082a923c81..767bc8c619 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
@@ -5,6 +5,7 @@
'require uci';
'require rpc';
'require form';
+'require tools.widgets as widgets';
var callInitList, callInitAction, callTimezone,
callGetLocaltime, callSetLocaltime, CBILocalTime;
@@ -282,6 +283,15 @@ return view.extend({
o.ucisection = 'ntp';
o.depends('enabled', '1');
+ o = s.taboption('timesync', widgets.NetworkSelect, 'interface',
+ _('Bind NTP server'),
+ _('Provide the NTP server to the selected interface or, if unspecified, to all interfaces'));
+ o.ucisection = 'ntp';
+ o.depends('enable_server', '1');
+ o.multiple = false;
+ o.nocreate = true;
+ o.optional = true;
+
o = s.taboption('timesync', form.Flag, 'use_dhcp', _('Use DHCP advertised servers'));
o.ucisection = 'ntp';
o.default = o.enabled;