- -- Build per-port off/untagged/tagged choice lists.
- local pt
- for pt = 0, num_ports - 1 do
- local title
- if pt == cpu_port then
- title = translate("CPU")
- else
- title = translatef("Port %d", pt)
- end
-
- local po = s:option(ListValue, tostring(pt), title)
+ local _, pt
+ for _, pt in ipairs(topo.ports) do
+ local po = s:option(ListValue, tostring(pt.num), pt.label, '<div id="portstatus-%s-%d"></div>' %{ switch_name, pt.num })