luci2: fix protocol modules after modular rework
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 7 Jan 2015 20:13:04 +0000 (21:13 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 7 Jan 2015 20:13:04 +0000 (21:13 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
luci2/htdocs/luci2/proto/6in4.js
luci2/htdocs/luci2/proto/6rd.js
luci2/htdocs/luci2/proto/6to4.js
luci2/htdocs/luci2/proto/dhcp.js
luci2/htdocs/luci2/proto/dhcpv6.js
luci2/htdocs/luci2/proto/dslite.js
luci2/htdocs/luci2/proto/none.js
luci2/htdocs/luci2/proto/static.js

index bb65184..3223065 100644 (file)
@@ -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);
index 47f6d29..36030f4 100644 (file)
@@ -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'),
index 4ec81b0..0fa3587 100644 (file)
@@ -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];
                };
index 4f0ae46..9af8c16 100644 (file)
@@ -1,4 +1,4 @@
-L.NetworkModel.Protocol.extend({
+L.network.Protocol.extend({
        protocol:    'dhcp',
        description: L.tr('DHCP client'),
        tunnel:      false,
index 48c858a..48d84aa 100644 (file)
@@ -1,4 +1,4 @@
-L.NetworkModel.Protocol.extend({
+L.network.Protocol.extend({
        protocol:    'dhcpv6',
        description: L.tr('DHCPv6 client / IPv6 autoconfig'),
        tunnel:      false,
index 26a92b5..84df4e2 100644 (file)
@@ -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'),
index 0b7a648..94c0f14 100644 (file)
@@ -1,4 +1,4 @@
-L.NetworkModel.Protocol.extend({
+L.network.Protocol.extend({
        protocol:    'none',
        description: L.tr('Unmanaged'),
        tunnel:      false,
index e9b9580..c1697af 100644 (file)
@@ -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'),