luci-proto-modemmanager: add allowed and preferred mode
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 9 Aug 2023 11:48:33 +0000 (13:48 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 1 Sep 2023 08:01:20 +0000 (10:01 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 5b925ea92b2d3a2f068f9835e533c8cfd86c427a)

protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js

index 34b71addd67f85033d7f2927e017acfcd21041fc..083f8806dab557883720c3adf7515995d21a6b9b 100644 (file)
@@ -82,6 +82,44 @@ return network.registerProtocol('modemmanager', {
                o.value('none', _('None'));
                o.default = 'none';
 
+               o = s.taboption('general', form.ListValue, 'allowedmode', _('Allowed network technology'),
+                       _('Setting the allowed network technology.'));
+               o.value('2g');
+               o.value('3g');
+               o.value('3g|2g');
+               o.value('4g');
+               o.value('4g|2g');
+               o.value('4g|3g');
+               o.value('4g|3g|2g');
+               o.value('5g');
+               o.value('5g|2g');
+               o.value('5g|3g');
+               o.value('5g|3g|2g');
+               o.value('5g|4g');
+               o.value('5g|4g|2g');
+               o.value('5g|4g|3g');
+               o.value('5g|4g|3g|2g');
+               o.value('',_('any'));
+               o.default = '';
+
+               o = s.taboption('general', form.ListValue, 'preferredmode', _('Preferred network technology'),
+                       _('Setting the preferred network technology.'));
+               o.value('2g');
+               o.value('3g');
+               o.value('4g');
+               o.value('5g');
+               o.depends('allowedmode','3g|2g');
+               o.depends('allowedmode','4g|2g');
+               o.depends('allowedmode','4g|3g');
+               o.depends('allowedmode','4g|3g|2g');
+               o.depends('allowedmode','5g|2g');
+               o.depends('allowedmode','5g|3g');
+               o.depends('allowedmode','5g|3g|2g');
+               o.depends('allowedmode','5g|4g');
+               o.depends('allowedmode','5g|4g|2g');
+               o.depends('allowedmode','5g|4g|3g');
+               o.depends('allowedmode','5g|4g|3g|2g');
+
                o = s.taboption('general', form.Value, 'username', _('PAP/CHAP username'));
                o.depends('auth', 'pap');
                o.depends('auth', 'chap');