mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Add support for VLAN names
This commit is contained in:
+3
-4
@@ -22,8 +22,7 @@ function vlanForm() {
|
||||
} else {
|
||||
o.src = "port.svg"; o.width = "40"; o.height = "40";
|
||||
}
|
||||
l.appendChild(inp);
|
||||
l.appendChild(o);
|
||||
l.appendChild(inp); l.appendChild(o);
|
||||
d.appendChild(l)
|
||||
t.appendChild(d);
|
||||
var d2=d.cloneNode(true);
|
||||
@@ -33,8 +32,7 @@ function vlanForm() {
|
||||
}
|
||||
}
|
||||
|
||||
function setC(t, p, c)
|
||||
{
|
||||
function setC(t, p, c){
|
||||
document.getElementById(t+'port'+p).checked=c;
|
||||
}
|
||||
|
||||
@@ -55,6 +53,7 @@ function fetchVLAN() {
|
||||
const s = JSON.parse(xhttp.responseText);
|
||||
console.log("VLAN: ", JSON.stringify(s));
|
||||
m = parseInt(s.members, 16);
|
||||
document.getElementById('vname').value = s.name;
|
||||
for (let i = 1; i <= numPorts; i++) {
|
||||
setC('t', i, (m>>(10+i-1))&1);
|
||||
setC('u', i, (m>>(i-1))&1);
|
||||
|
||||
Reference in New Issue
Block a user