400G cache boxes behind 400G or faster router ports

This commit is contained in:
Frederic Jung 2026-11-01 11:37:34 +01:00
parent 6b8791c605
commit 7202441716
No known key found for this signature in database
21 changed files with 55 additions and 29 deletions

View file

@ -13,7 +13,7 @@ Object.assign(ACT,{
utilityCaches:({city,quote,modal})=>{const q=utilityCaches(city);if(!q||!q.add.length)return;
if(q.key!==quote){if(modal)utilitiesModal(city,tr('utilities.quote_changed'));else{renderPanel();toast(tr('utilities.quote_changed'));}return;}
if(!portGate(city,q.ports))return;
for(const c of q.add)S.caches.push({id:uid(),city,net:c.net,site:c.site});
for(const c of q.add)S.caches.push({id:uid(),city,net:c.net,site:c.site,...(c.g?{g:c.g}:{})});
sfx('build');after();const msg=tr('utilities.caches_requested',{n:q.add.length,city:CITY[city].name});if(modal)utilitiesModal(city,msg);else toast(esc(msg),'good');},
utilityPeers:({city}={})=>{if(!S)return;const rows=utilityPeers();let n=0;
for(const row of rows)for(const id of row.requests){S.peers[id+'@'+row.ix]=true;n++;}