lag gui: create the group the page says it is creating

The LAG page draws four sections headed LAG 1 to LAG 4 and wires their buttons
to lagSub(0) through lagSub(3), which then sends the index straight through as
the group number. So the first button asks for "lag 0", which the parser
rejects, and the page shows nothing at all because the error only goes to the
console. Every other button is off by one: the section headed LAG 2 creates
group 1.

The index stays 0-based for the element ids and only the command gets the
1-based number the CLI documents.
This commit is contained in:
d00f committed 2026-09-05 13:28:14 +02:00
1 parent 8a7b146892
commit f2966ad248
1 file changed
+1 -1
+1 -1
View File
@@ -57,7 +57,7 @@ function fetchLag() {
sendXHTTP(xhttp);
}
async function lagSub(l) {
var cmd = "lag " + l;
var cmd = "lag " + (l + 1);
for (let i = 1; i <= numPorts; i++) {
if (document.getElementById("p_mLAG"+l+"_"+i).checked)
cmd = cmd + ` ${i}`;