summaryrefslogtreecommitdiffhomepage
path: root/protocols
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2023-06-13 10:35:37 +0200
committerGitHub <noreply@github.com>2023-06-13 10:35:37 +0200
commitdac9ec0cd18eadd0a00ed07f10b3d6c1a04167d3 (patch)
tree86aae901c74f2d31aa7637a787b13ee78c32ab47 /protocols
parent5a2ffc3f52c6b04f2001051a7961e6e9bf2dec2d (diff)
parentc682e530e2b95af7768b6a0c74c942222e0cd78d (diff)
Merge pull request #6426 from Leo-PL/uqmi-split-apn-dualstack
luci-proto-qmi: allow v6apn and (v6)profile configuration
Diffstat (limited to 'protocols')
-rw-r--r--protocols/luci-proto-qmi/htdocs/luci-static/resources/protocol/qmi.js23
1 files changed, 21 insertions, 2 deletions
diff --git a/protocols/luci-proto-qmi/htdocs/luci-static/resources/protocol/qmi.js b/protocols/luci-proto-qmi/htdocs/luci-static/resources/protocol/qmi.js
index 98ae486d37..1963bc0412 100644
--- a/protocols/luci-proto-qmi/htdocs/luci-static/resources/protocol/qmi.js
+++ b/protocols/luci-proto-qmi/htdocs/luci-static/resources/protocol/qmi.js
@@ -65,8 +65,7 @@ return network.registerProtocol('qmi', {
}, this));
};
- o = s.taboption('general', form.Value, 'apn', _('APN'));
- o.validate = function(section_id, value) {
+ var validate_apn = function(section_id, value) {
if (value == null || value == '')
return true;
@@ -75,6 +74,14 @@ return network.registerProtocol('qmi', {
return true;
};
+ o = s.taboption('general', form.Value, 'apn', _('APN'));
+ o.validate = validate_apn;
+
+ if (L.hasSystemFeature('ipv6')) {
+ o = s.taboption('general', form.Value, 'v6apn', _('IPv6 APN'));
+ o.validate = validate_apn;
+ o.depends('pdptype', 'ipv4v6')
+ };
o = s.taboption('general', form.Value, 'pincode', _('PIN'));
o.datatype = 'and(uinteger,minlength(4),maxlength(8))';
@@ -133,5 +140,17 @@ return network.registerProtocol('qmi', {
_('If unchecked, the advertised DNS server addresses are ignored'));
o.default = o.enabled;
+ o = s.taboption('advanced', form.Value, 'profile',
+ _('APN profile index'));
+ o.placeholder = '1';
+ o.datatype = 'uinteger';
+
+ if (L.hasSystemFeature('ipv6')) {
+ o = s.taboption('advanced', form.Value, 'v6profile',
+ _('IPv6 APN profile index'));
+ o.placeholder = '1';
+ o.datatype = 'uinteger';
+ o.depends('pdptype', 'ipv4v6');
+ };
}
});