Files
RTLPlayground/html
d00f 38b8e38c04 ports: show the SFP port in the table, and read the right link state
The port table skipped every SFP port outright, so on a SWTGW218AS the
uplink simply was not there. Of the seven columns only Set Speed is
meaningless for a module: the name, the link speed and the devices behind
the port all are worth showing, and the name in particular was accepted on
another page and then never displayed anywhere. The MTU table further down
the same page has always drawn the port, so the page disagreed with itself.

Give an SFP port its row and leave the three control cells empty. Whether
speed and disable should work for a module is a separate question and
untested, so this does not offer a button for it.

The link state was read one port too far. main.js fills pState by
portNum - 1, updatePortTable() reads pState[i-1], and createPortTable()
read pState[i], so every row started out showing the next port's link
speed until the first refresh corrected it. On the last copper port that
meant showing the uplink's speed. Feeding the real status.json of a nine
port switch through both versions:

  expected  7  7  7  1  7  1  7  7  6
  before    7  7  1  7  1  7  7  6
  after     7  7  7  1  7  1  7  7  6

Dropping the skip also removes a trap rather than papering over it.
updatePortTable() addresses rows as tbl.rows[i], which only lined up with
port i because the SFP port happens to be last on this board. With a
module in the middle every row after it would have been off by one.
2026-09-06 00:09:22 +02:00
..
2026-07-05 00:51:27 +09:00
2025-10-20 18:35:35 +02:00
2026-07-05 00:51:27 +09:00
2026-07-05 00:51:27 +09:00
2026-07-05 00:51:27 +09:00
2026-07-05 00:51:27 +09:00
2026-03-10 06:16:18 +01:00
2026-07-05 00:51:27 +09:00
2026-03-10 06:16:18 +01:00
2026-07-05 00:51:27 +09:00
2026-08-18 23:30:25 +02:00
2026-08-18 23:30:25 +02:00
2026-07-05 00:51:27 +09:00
2026-07-05 00:51:27 +09:00
2026-07-05 00:51:27 +09:00