luci2: fix protocol modules after modular rework
[project/luci2/ui.git] / luci2 / htdocs / luci2 / proto / dslite.js
1 L.network.Protocol.extend({
2 protocol: 'dslite',
3 description: L.tr('Dual-Stack Lite (RFC6333)'),
4 tunnel: true,
5 virtual: true,
6
7 populateForm: function(section, iface)
8 {
9 var wan6 = L.network.findWAN6();
10
11 section.taboption('general', L.cbi.InputValue, 'peeraddr', {
12 caption: L.tr('DS-Lite AFTR address'),
13 datatype: 'ip6addr',
14 optional: false
15 });
16
17 section.taboption('general', L.cbi.InputValue, 'ip6addr', {
18 caption: L.tr('Local IPv6 address'),
19 description: L.tr('Leave empty to use the current WAN address'),
20 datatype: 'ip6addr',
21 placeholder: wan6 ? wan6.getIPv6Addrs()[0] : undefined,
22 optional: true
23 });
24
25 section.taboption('advanced', L.cbi.NetworkList, 'tunlink', {
26 caption: L.tr('Tunnel Link'),
27 initial: wan6 ? wan6.name() : undefined,
28 optional: true
29 });
30
31 section.taboption('advanced', L.cbi.CheckboxValue, 'defaultroute', {
32 caption: L.tr('Default route'),
33 description: L.tr('Create IPv4 default route via tunnel'),
34 optional: true,
35 initial: true
36 });
37
38 section.taboption('advanced', L.cbi.InputValue, 'ttl', {
39 caption: L.tr('Override TTL'),
40 description: L.tr('Specifies the Time-to-Live on the tunnel interface'),
41 datatype: 'range(1,255)',
42 placeholder: 64,
43 optional: true
44 });
45 }
46 });