diff options
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index fd7487b3de..b826ccb094 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -502,7 +502,8 @@ return view.extend({ s.load = function() { return Promise.all([ network.getNetworks(), - firewall.getZones() + firewall.getZones(), + uci.load('system') ]).then(L.bind(function(data) { this.networks = data[0]; this.zones = data[1]; @@ -988,6 +989,27 @@ return view.extend({ so.depends('dhcpv6', 'server'); so.depends({ dhcpv6: 'hybrid', master: '0' }); + //This is a DHCPv6 specific odhcpd setting + so = ss.taboption('ipv6', form.DynamicList, 'ntp', _('NTP Servers'), + _('DHCPv6 option 56. %s.', 'DHCPv6 option 56. RFC5908 link').format('<a href="%s" target="_blank">RFC5908</a>').format('https://www.rfc-editor.org/rfc/rfc5908#section-4')); + so.datatype = 'host(0)'; + for(var x of uci.get('system', 'ntp', 'server') || '') { + so.value(x); + } + var lan_net = this.networks.filter(function(n) { return n.getName() == 'lan' })[0]; + // If ntpd is set up, suggest our IP(v6) also + if(uci.get('system', 'ntp', 'enable_server')) { + lan_net.getIPAddrs().forEach(function(i4) { + so.value(i4.split('/')[0]); + }); + lan_net.getIP6Addrs().forEach(function(i6) { + so.value(i6.split('/')[0]); + }); + } + so.optional = true; + so.rmempty = true; + so.depends('dhcpv6', 'server'); + so.depends({ dhcpv6: 'hybrid', master: '0' }); so = ss.taboption('ipv6', cbiRichListValue, 'ndp', _('<abbr title="Neighbour Discovery Protocol">NDP</abbr>-Proxy'), _('Configures the operation mode of the NDP proxy service on this interface.')); |