use select for wifi channels
This commit is contained in:
parent
62658fe2ce
commit
9b7415dcae
16
l3config.js
16
l3config.js
|
@ -293,6 +293,12 @@ function initForm() {
|
|||
let form = document.createElement('form');
|
||||
l3configinput.appendChild(form);
|
||||
|
||||
const UNII1Channels = [36, 40, 44, 48];
|
||||
const UNII2Channels = [52, 56, 60, 64];
|
||||
const UNII2EChannels = [100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140];
|
||||
const Channels5GHz = [...UNII1Channels, ...UNII2Channels, ...UNII2EChannels].map(chan => [chan.toString(), chan.toString()]);
|
||||
const Channels2GHz = Array(13).fill().map((_, chan) => [chan.toString(), chan.toString()]);
|
||||
|
||||
const l3cfg = new L3Config();
|
||||
l3cfg.addSection(new L3Section('gateway', 'meta',
|
||||
new L3Input('Router Name','gatewayName', 'name', {type: 'search', placeholder: 'Router Name'}),
|
||||
|
@ -331,8 +337,14 @@ function initForm() {
|
|||
new L3Input('DHCP Start Address','clientDHCPStart', 'dhcp_start', {type: 'text', maxlength: 15, placeholder: 'IPv4 Address, 10.XX.YY.10'}),
|
||||
new L3Input('DHCP Number of Addresses','clientDHCPLimit', 'dhcp_limit', {type: 'number', max: 65535}),
|
||||
new L3Input('Wifi ESSID','clientESSID', 'essid', {type: 'text'}),
|
||||
new L3Input('Wifi 2.4 GHz Channel','client2GHZ', 'chan2ghz', {type: 'number', min: 1, max: 13}),
|
||||
new L3Input('Wifi 5 GHz Channel','client5GHZ', 'chan5ghz', {type: 'number', min: 36, max: 140}),
|
||||
new L3Select('Wifi 2.4 GHz Channel','client2GHZ', 'chan2ghz', {name: 'chan2ghz'}, [
|
||||
['---', undefined],
|
||||
...Channels2GHz,
|
||||
]),
|
||||
new L3Select('Wifi 5 GHz Channel','client5GHZ', 'chan5ghz', {name: 'chan5ghz'}, [
|
||||
['---', undefined],
|
||||
...Channels5GHz,
|
||||
]),
|
||||
));
|
||||
l3cfg.addSection(new L3MultiSection('VLAN', function(idsuffix) {
|
||||
return new L3Section('vlan', makeInput('vlanSectionName'+idsuffix, {type: 'number', min: 1, max: 4094, required: ''}),
|
||||
|
|
Loading…
Reference in New Issue