The connections list no longer breaks on a 400G fabric port
Some checks failed
CI / plan (push) Has been cancelled
CI / build (push) Has been cancelled
CI / translations (push) Has been cancelled
CI / part (push) Has been cancelled
CI / test (push) Has been cancelled
CI / timings (push) Has been cancelled

connUp offered the next PORT tier for a fabric (NNI) port, but fabric ports
stop at 400G: NNI[3] was undefined and renderDash threw. Upstream code
(85701db); the city panel already maps over NNI and is fine.

Perf (jsdom, big network, vs 4b922ab): no slowdowns beyond noise, routing
identical.
This commit is contained in:
jvanvik 2026-11-07 10:33:22 +01:00
parent 4b922aba02
commit e8808f605d
3 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,7 @@ All notable changes to this project are documented here. The project follows
## [Unreleased] ## [Unreleased]
- The NOC dashboard's connections list no longer breaks when one of your fabric ports is already at 400G, the biggest a fabric port gets: it offers a LAG member instead of an upgrade.
- Broadband cities can now go IPv6-only with 464XLAT, a second way to save IPv4 next to CGNAT. Start it from a city's Home broadband, which also says what it does to your monthly IPv4 bill: its home routers are swapped over a month or more, paid as each one goes in (new homes there get one too, at the same price), and the homes then need no IPv4 address of their own, only a share of a NAT64 pool at up to 256 homes per address, with fewer refunds than CGNAT at the same ratio. The bank's Address space section shows your homes as public, behind CGNAT and IPv6-only, with the NAT64 ratio next to the CGNAT one, and says which of the two to stretch when space runs out. - Broadband cities can now go IPv6-only with 464XLAT, a second way to save IPv4 next to CGNAT. Start it from a city's Home broadband, which also says what it does to your monthly IPv4 bill: its home routers are swapped over a month or more, paid as each one goes in (new homes there get one too, at the same price), and the homes then need no IPv4 address of their own, only a share of a NAT64 pool at up to 256 homes per address, with fewer refunds than CGNAT at the same ratio. The bank's Address space section shows your homes as public, behind CGNAT and IPv6-only, with the NAT64 ratio next to the CGNAT one, and says which of the two to stretch when space runs out.
- CGNAT gets a little cheaper every year: the world moves to IPv6 about two points a year, so less of your homes' traffic needs IPv4 and the CGNAT and NAT64 boxes carry less of it. - CGNAT gets a little cheaper every year: the world moves to IPv6 about two points a year, so less of your homes' traffic needs IPv4 and the CGNAT and NAT64 boxes carry less of it.
- The router model and the line system your intern standardizes on are now picked in one place, the build standard. Keep routers ahead and Upgrade optical transport take them from there and say so, with a button to the sheet. With a model or line system in the standard, both orders bring everything up to it and stop there (Upgrade optical transport on every fiber, even at POPs that Keep to the build standard skips); "Keep as is" leaves them to the next one up when busy. A model or line system you had picked in an order that was running moves into your standard, so new POPs get that model too. - The router model and the line system your intern standardizes on are now picked in one place, the build standard. Keep routers ahead and Upgrade optical transport take them from there and say so, with a button to the sheet. With a model or line system in the standard, both orders bring everything up to it and stop there (Upgrade optical transport on every fiber, even at POPs that Keep to the build standard skips); "Keep as is" leaves them to the next one up when busy. A model or line system you had picked in an order that was running moves into your standard, so new POPs get that model too.

View file

@ -26,7 +26,7 @@ function connUp(r){if(r.mine)return '';const nx=t=>PORT[t+1]&&portShown(t+1)?t+1
if(i>=0)h+=btn(tr('common.upgrade_port_price',{port:PORT[i].n,price:portMo(ixPortMo(c,i)*n)}),'buyIx',{city:c,tier:i},'sm',(!!S.pops[city]&&!portOk(city,i))||(!S.pops[city]&&i>1)); if(i>=0)h+=btn(tr('common.upgrade_port_price',{port:PORT[i].n,price:portMo(ixPortMo(c,i)*n)}),'buyIx',{city:c,tier:i},'sm',(!!S.pops[city]&&!portOk(city,i))||(!S.pops[city]&&i>1));
if(S.pops[city]&&!S.myIx[c]&&n<LAG_MAX)h+=btn(tr('common.lag_member_price',{price:portMo(ixPortMo(c,S.ixp[c]))}),'lagIx',{city:c,d:1},'sm',S.cash<ixPortMo(c,S.ixp[c]));} if(S.pops[city]&&!S.myIx[c]&&n<LAG_MAX)h+=btn(tr('common.lag_member_price',{price:portMo(ixPortMo(c,S.ixp[c]))}),'lagIx',{city:c,d:1},'sm',S.cash<ixPortMo(c,S.ixp[c]));}
else if(r.k==='c')h+=btn(tr('common.box'),'cache',{city:r.city,net:r.net},'sm'); else if(r.k==='c')h+=btn(tr('common.box'),'cache',{city:r.city,net:r.net},'sm');
else if(r.k==='nni'){const [city,prov]=r.id.split('|'),pt=nniPort(city,prov);if(!pt)return '';const n=pt.n||1,i=nx(pt.tier); else if(r.k==='nni'){const [city,prov]=r.id.split('|'),pt=nniPort(city,prov);if(!pt)return '';const n=pt.n||1,i=NNI[pt.tier+1]?nx(pt.tier):-1; // fabric ports stop at 400G
if(i>=0){const c=NNI[i].mo*n;h+=btn(n>1?tr('common.upgrade_all_to_port_cost_mo',{port:NNI[i].n,cost:fmt$(c),mo:fmt$(c)}):tr('common.upgrade_port_price_mo',{port:NNI[i].n,price:fmt$(c)}),'buyNni',{city,prov,tier:i},'sm',S.cash<c||!portOk(city,i));} if(i>=0){const c=NNI[i].mo*n;h+=btn(n>1?tr('common.upgrade_all_to_port_cost_mo',{port:NNI[i].n,cost:fmt$(c),mo:fmt$(c)}):tr('common.upgrade_port_price_mo',{port:NNI[i].n,price:fmt$(c)}),'buyNni',{city,prov,tier:i},'sm',S.cash<c||!portOk(city,i));}
if(n<LAG_MAX)h+=btn(tr('common.lag_member_price',{price:portMo(NNI[pt.tier].mo)}),'lagNni',{city,prov,d:1},'sm',S.cash<NNI[pt.tier].mo||!portOk(city,pt.tier));} if(n<LAG_MAX)h+=btn(tr('common.lag_member_price',{price:portMo(NNI[pt.tier].mo)}),'lagNni',{city,prov,d:1},'sm',S.cash<NNI[pt.tier].mo||!portOk(city,pt.tier));}
return h;} return h;}

View file

@ -773,6 +773,10 @@ test('connections in the NOC dashboard can be upgraded and grown into LAGs right
assert.equal(ev("S.nni[0].tier"), 1); assert.equal(ev("S.nni[0].tier"), 1);
assert.ok(tap('lagNni'), 'a fabric port bundles into a LAG too (#140)'); assert.ok(tap('lagNni'), 'a fabric port bundles into a LAG too (#140)');
assert.equal(ev("S.nni[0].n"), 2); assert.equal(ev("S.nni[0].n"), 2);
// A fabric port at 400G is as big as fabric ports get: no upgrade button, and the list still draws.
ev("S.nni[0].tier=NNI.length-1;compute();renderDash()");
assert.equal(ev("!!document.querySelector('#dashCard [data-act=\"buyNni\"]')"), false, 'no fabric port above 400G');
assert.ok(ev("!!document.querySelector('#dashCard [data-act=\"lagNni\"]')"), 'a LAG member is still offered');
assert.equal(ev("document.getElementById('dash').hidden"), false); assert.equal(ev("document.getElementById('dash').hidden"), false);
assert.deepEqual(errors, []); assert.deepEqual(errors, []);
}); });