diff options
Diffstat (limited to 'protocols/luci-proto-pppossh')
-rw-r--r-- | protocols/luci-proto-pppossh/htdocs/luci-static/resources/protocol/pppossh.js | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/protocols/luci-proto-pppossh/htdocs/luci-static/resources/protocol/pppossh.js b/protocols/luci-proto-pppossh/htdocs/luci-static/resources/protocol/pppossh.js index ec8e8a152e..bc1345ee3e 100644 --- a/protocols/luci-proto-pppossh/htdocs/luci-static/resources/protocol/pppossh.js +++ b/protocols/luci-proto-pppossh/htdocs/luci-static/resources/protocol/pppossh.js @@ -11,13 +11,13 @@ function write_keepalive(section_id, value) { f = (f_opt != null) ? +f_opt[0].formvalue(section_id) : null, i = (i_opt != null) ? +i_opt[0].formvalue(section_id) : null; - if (f == null || f == '' || isNaN(f)) - f = 0; + if (f === '' || isNaN(f)) + f = null; if (i == null || i == '' || isNaN(i) || i < 1) i = 1; - if (f > 0) + if (f !== null) uci.set('network', section_id, 'keepalive', '%d %d'.format(f, i)); else uci.unset('network', section_id, 'keepalive'); @@ -90,27 +90,13 @@ return network.registerProtocol('pppossh', { o.datatype = 'ipaddr("nomask")'; if (L.hasSystemFeature('ipv6')) { - o = s.taboption('advanced', form.Flag, 'ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link')); + o = s.taboption('advanced', form.Flag, 'ppp_ipv6', _('Obtain IPv6 address'), _('Enable IPv6 negotiation on the PPP link')); + o.ucioption = 'ipv6'; o.default = o.disabled; } - o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured')); - o.default = o.enabled; - - o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored')); - o.default = o.enabled; - - o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers')); - o.depends('peerdns', '0'); - o.datatype = 'ipaddr'; - o.cast = 'string'; - - o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric')); - o.placeholder = '0'; - o.datatype = 'uinteger'; - o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures')); - o.placeholder = '0'; + o.placeholder = '5'; o.datatype = 'uinteger'; o.write = write_keepalive; o.remove = write_keepalive; @@ -123,7 +109,7 @@ return network.registerProtocol('pppossh', { }; o = s.taboption('advanced', form.Value, '_keepalive_interval', _('LCP echo interval'), _('Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold')); - o.placeholder = '5'; + o.placeholder = '1'; o.datatype = 'min(1)'; o.write = write_keepalive; o.remove = write_keepalive; |