From 34d2a62f8607c0697a21565b280b9c66ebd9cc59 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 7 Jan 2015 21:13:04 +0100 Subject: [PATCH] luci2: fix protocol modules after modular rework Signed-off-by: Jo-Philipp Wich --- luci2/htdocs/luci2/proto/6in4.js | 17 +++++++++-------- luci2/htdocs/luci2/proto/6rd.js | 4 ++-- luci2/htdocs/luci2/proto/6to4.js | 4 ++-- luci2/htdocs/luci2/proto/dhcp.js | 2 +- luci2/htdocs/luci2/proto/dhcpv6.js | 2 +- luci2/htdocs/luci2/proto/dslite.js | 4 ++-- luci2/htdocs/luci2/proto/none.js | 2 +- luci2/htdocs/luci2/proto/static.js | 4 ++-- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/luci2/htdocs/luci2/proto/6in4.js b/luci2/htdocs/luci2/proto/6in4.js index bb65184..3223065 100644 --- a/luci2/htdocs/luci2/proto/6in4.js +++ b/luci2/htdocs/luci2/proto/6in4.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: '6in4', description: L.tr('IPv6-in-IPv4 (RFC4213)'), tunnel: true, @@ -6,7 +6,7 @@ L.NetworkModel.Protocol.extend({ populateForm: function(section, iface) { - var wan = L.NetworkModel.findWAN(); + var wan = L.network.findWAN(); section.taboption('general', L.cbi.InputValue, 'ipaddr', { caption: L.tr('Local IPv4 address'), @@ -18,15 +18,15 @@ L.NetworkModel.Protocol.extend({ section.taboption('general', L.cbi.InputValue, 'peeraddr', { caption: L.tr('Remote IPv4 address'), - description: L.tr('This is usually the address of the nearest PoP optional by the tunnel broker'), + description: L.tr('This is usually the address of the nearest PoP operated by the tunnel broker'), datatype: 'ip4addr', optional: false }); section.taboption('general', L.cbi.InputValue, 'ip6addr', { caption: L.tr('Local IPv6 address'), - description: L.tr('This is the local endpoint address assigned by the tunnel broker, it usually ends with :2'), - datatype: 'ip6addr', + description: L.tr('This is the local endpoint address assigned by the tunnel broker'), + datatype: 'cidr6', optional: false }); @@ -59,14 +59,15 @@ L.NetworkModel.Protocol.extend({ section.taboption('general', L.cbi.InputValue, 'username', { caption: L.tr('HE.net user ID'), - description: L.tr('This is the 32 byte hex encoded user ID, not the login name'), - datatype: 'rangelength(32, 32)', + description: L.tr('The login name of the HE.net account'), + datatype: 'string', optional: false, keep: false }).depends('_update', true); section.taboption('general', L.cbi.PasswordValue, 'password', { - caption: L.tr('HE.net password'), + caption: L.tr('Password'), + description: L.tr('Tunnel update key or HE.net account password'), optional: false, keep: false }).depends('_update', true); diff --git a/luci2/htdocs/luci2/proto/6rd.js b/luci2/htdocs/luci2/proto/6rd.js index 47f6d29..36030f4 100644 --- a/luci2/htdocs/luci2/proto/6rd.js +++ b/luci2/htdocs/luci2/proto/6rd.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: '6rd', description: L.tr('IPv6-over-IPv4 (6rd)'), tunnel: true, @@ -6,7 +6,7 @@ L.NetworkModel.Protocol.extend({ populateForm: function(section, iface) { - var wan = L.NetworkModel.findWAN(); + var wan = L.network.findWAN(); section.taboption('general', L.cbi.InputValue, 'peeraddr', { caption: L.tr('6RD Gateway'), diff --git a/luci2/htdocs/luci2/proto/6to4.js b/luci2/htdocs/luci2/proto/6to4.js index 4ec81b0..0fa3587 100644 --- a/luci2/htdocs/luci2/proto/6to4.js +++ b/luci2/htdocs/luci2/proto/6to4.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: '6to4', description: L.tr('IPv6-over-IPv4 (6to4)'), tunnel: true, @@ -12,7 +12,7 @@ L.NetworkModel.Protocol.extend({ datatype: 'ip4addr', optional: true }).load = function() { - var wan = L.NetworkModel.findWAN(); + var wan = L.network.findWAN(); if (wan) this.options.placeholder = wan.getIPv4Addrs()[0]; }; diff --git a/luci2/htdocs/luci2/proto/dhcp.js b/luci2/htdocs/luci2/proto/dhcp.js index 4f0ae46..9af8c16 100644 --- a/luci2/htdocs/luci2/proto/dhcp.js +++ b/luci2/htdocs/luci2/proto/dhcp.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: 'dhcp', description: L.tr('DHCP client'), tunnel: false, diff --git a/luci2/htdocs/luci2/proto/dhcpv6.js b/luci2/htdocs/luci2/proto/dhcpv6.js index 48c858a..48d84aa 100644 --- a/luci2/htdocs/luci2/proto/dhcpv6.js +++ b/luci2/htdocs/luci2/proto/dhcpv6.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: 'dhcpv6', description: L.tr('DHCPv6 client / IPv6 autoconfig'), tunnel: false, diff --git a/luci2/htdocs/luci2/proto/dslite.js b/luci2/htdocs/luci2/proto/dslite.js index 26a92b5..84df4e2 100644 --- a/luci2/htdocs/luci2/proto/dslite.js +++ b/luci2/htdocs/luci2/proto/dslite.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: 'dslite', description: L.tr('Dual-Stack Lite (RFC6333)'), tunnel: true, @@ -6,7 +6,7 @@ L.NetworkModel.Protocol.extend({ populateForm: function(section, iface) { - var wan6 = L.NetworkModel.findWAN6(); + var wan6 = L.network.findWAN6(); section.taboption('general', L.cbi.InputValue, 'peeraddr', { caption: L.tr('DS-Lite AFTR address'), diff --git a/luci2/htdocs/luci2/proto/none.js b/luci2/htdocs/luci2/proto/none.js index 0b7a648..94c0f14 100644 --- a/luci2/htdocs/luci2/proto/none.js +++ b/luci2/htdocs/luci2/proto/none.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: 'none', description: L.tr('Unmanaged'), tunnel: false, diff --git a/luci2/htdocs/luci2/proto/static.js b/luci2/htdocs/luci2/proto/static.js index e9b9580..c1697af 100644 --- a/luci2/htdocs/luci2/proto/static.js +++ b/luci2/htdocs/luci2/proto/static.js @@ -1,4 +1,4 @@ -L.NetworkModel.Protocol.extend({ +L.network.Protocol.extend({ protocol: 'static', description: L.tr('Static address'), tunnel: false, @@ -39,7 +39,7 @@ L.NetworkModel.Protocol.extend({ populateForm: function(section, iface) { - var device = L.NetworkModel.getDeviceByInterface(iface); + var device = L.network.getDeviceByInterface(iface); section.taboption('general', L.cbi.InputValue, 'ipaddr', { caption: L.tr('IPv4 address'), -- 2.11.0