Merge pull request #333 from fjaeckel/claude/bulk-actions
Fewer clicks in the late game: POP standards, kit everywhere, buy on signing, network search
This commit is contained in:
commit
d42fc5b68e
31 changed files with 692 additions and 18 deletions
|
|
@ -6,6 +6,12 @@ All notable changes to this project are documented here. The project follows
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- From customer level 2, you can save up to three POP standards (micro POP, medium POP, regional hub), each a router model and a number of routers, and mark which POP is which. One button in a POP's Infra tab brings it up to its standard, and Utilities brings every POP of a kind up at once with the price shown first. A POP is never stepped down to a smaller model, and a busy POP with one router gets its second router before the swap, so the upgrade rolls instead of taking the POP down (#315).
|
||||||
|
- Utilities can now install the redundancy kit at every POP still missing part of it in one go, at one price shown on the button, from customer level 2. With a NOC intern you can also put the kit in the intern's new-POP template from there (#317).
|
||||||
|
- A customer asking for a backup generator, a second router or a second site at POPs you already have now shows what is missing and what it costs, with a button that buys exactly that and signs the deal. Nothing is bought unless you press it (#241).
|
||||||
|
- The NOC intern's "Light more fiber" order can now leave new fiber dark, so a fiber handed over in the night no longer pulls in traffic before you are ready for it. Fiber you light yourself still gets more optics when it runs hot (#316).
|
||||||
|
- The Transit and Peering tabs of a POP have a search box for a network's name or AS number and a "Connected only" switch, so you can find the one network you need in a long list, on phones too (#199).
|
||||||
|
- Decommissioning one of several links between the same two cities keeps the link panel open on the next one, so you can hand back a row of waves without reopening it each time (#119).
|
||||||
- A link that a closed border has taken down, like Doha to Dubai or Abu Dhabi while the neighbours have fallen out, now says so in its panel, with the days until it comes back, instead of showing nothing wrong. Leasing a new wave or fiber pair across that border during the spat warns you first that it will stay dark (#329).
|
- A link that a closed border has taken down, like Doha to Dubai or Abu Dhabi while the neighbours have fallen out, now says so in its panel, with the days until it comes back, instead of showing nothing wrong. Leasing a new wave or fiber pair across that border during the spat warns you first that it will stay dark (#329).
|
||||||
- A customer asking for a discount at renewal now shows how much traffic they book and get, the price per Gbps now and asked, and any latency limit or path terms they signed for, each ticked or crossed as your network stands today (#292).
|
- A customer asking for a discount at renewal now shows how much traffic they book and get, the price per Gbps now and asked, and any latency limit or path terms they signed for, each ticked or crossed as your network stands today (#292).
|
||||||
- The two city names at the top of a wave, dark fiber or virtual circuit panel now open that city, for example to upgrade the router there before a bigger link (#196).
|
- The two city names at the top of a wave, dark fiber or virtual circuit panel now open that city, for example to upgrade the router there before a bigger link (#196).
|
||||||
|
|
|
||||||
|
|
@ -3167,6 +3167,9 @@
|
||||||
"modal_and_names.the_real_thing_follow_a_packet":"Das Original: Folge einem Paket vom WLAN bis zur Unterseeglasfaser.",
|
"modal_and_names.the_real_thing_follow_a_packet":"Das Original: Folge einem Paket vom WLAN bis zur Unterseeglasfaser.",
|
||||||
"modals.lay_your_own_subsea_cable":"Eigenes Seekabel verlegen…",
|
"modals.lay_your_own_subsea_cable":"Eigenes Seekabel verlegen…",
|
||||||
"modals.your_own_subsea_cable_level_n":"Eigenes Seekabel <small>Level {n} oder Tier 1</small>",
|
"modals.your_own_subsea_cable_level_n":"Eigenes Seekabel <small>Level {n} oder Tier 1</small>",
|
||||||
|
"net_filter.clear":"Zurücksetzen",
|
||||||
|
"net_filter.connected_only":"Nur verbundene",
|
||||||
|
"net_filter.find_a_network":"Netzwerk oder AS-Nummer suchen",
|
||||||
"networks.a_mobile_network_named_after_the":"Ein Mobilfunknetz, benannt nach dem Klang anstoßender Gläser. Prost auf jeden 5G-Mast.",
|
"networks.a_mobile_network_named_after_the":"Ein Mobilfunknetz, benannt nach dem Klang anstoßender Gläser. Prost auf jeden 5G-Mast.",
|
||||||
"networks.a_spanish_carrier_starring_in_every":"Ein spanischer Carrier mit Hauptrolle in jedem lateinamerikanischen Markt, zumindest bis er den nächsten verkauft.",
|
"networks.a_spanish_carrier_starring_in_every":"Ein spanischer Carrier mit Hauptrolle in jedem lateinamerikanischen Markt, zumindest bis er den nächsten verkauft.",
|
||||||
"networks.a_tiny_telco_in_a_country":"Eine winzige Telco in einem Land, in dem die Kabel der Welt an Land gehen. Die Preise passen dazu.",
|
"networks.a_tiny_telco_in_a_country":"Eine winzige Telco in einem Land, in dem die Kabel der Welt an Land gehen. Die Preise passen dazu.",
|
||||||
|
|
@ -3402,6 +3405,7 @@
|
||||||
"ops.ops":"Ops",
|
"ops.ops":"Ops",
|
||||||
"ops.ops_name":"Ops · {name}",
|
"ops.ops_name":"Ops · {name}",
|
||||||
"ops.p_at":"Ab",
|
"ops.p_at":"Ab",
|
||||||
|
"ops.p_fresh":"Neue Glasfaser anknipsen",
|
||||||
"ops.p_g":"Ab",
|
"ops.p_g":"Ab",
|
||||||
"ops.p_how":"Wie",
|
"ops.p_how":"Wie",
|
||||||
"ops.p_keep":"Einen in Reserve",
|
"ops.p_keep":"Einen in Reserve",
|
||||||
|
|
@ -3933,6 +3937,29 @@
|
||||||
"pop_std.none":"Keiner",
|
"pop_std.none":"Keiner",
|
||||||
"pop_std.not_all_of_the_standard":"Nicht genug Geld oder Level für den ganzen Standard in {city}: Er bekam, was passte.",
|
"pop_std.not_all_of_the_standard":"Nicht genug Geld oder Level für den ganzen Standard in {city}: Er bekam, was passte.",
|
||||||
"pop_std.standard_for_new_pops":"Standard für neue POPs",
|
"pop_std.standard_for_new_pops":"Standard für neue POPs",
|
||||||
|
"pop_tiers.apply_cost":"Auf Standard bringen <small>{cost}</small>",
|
||||||
|
"pop_tiers.bring_up_n":{"one":"{n} POP hochbringen <small>{cost}</small>","other":"{n} POPs hochbringen <small>{cost}</small>"},
|
||||||
|
"pop_tiers.bulk_done":{"one":"{kind}: {n} POP auf den Standard gebracht.","other":"{kind}: {n} POPs auf den Standard gebracht."},
|
||||||
|
"pop_tiers.bulk_note":"Jeder POP, den du als eine Art markiert hast, in einem Rutsch auf ihren Standard gebracht. Ändere einen Standard (neues Modell, mehr Router) und drück nochmal.",
|
||||||
|
"pop_tiers.city_is_kind":"{city} erfüllt den Standard {kind}.",
|
||||||
|
"pop_tiers.hub":"Regionaler Hub",
|
||||||
|
"pop_tiers.mark":"Markieren",
|
||||||
|
"pop_tiers.medium":"Mittlerer POP",
|
||||||
|
"pop_tiers.meets_it":"Erfüllt",
|
||||||
|
"pop_tiers.micro":"Mikro-POP",
|
||||||
|
"pop_tiers.model_locked":"{model} gibt es ab Kundenlevel {lv}.",
|
||||||
|
"pop_tiers.n_below":{"one":"{n} unter dem Standard","other":"{n} unter dem Standard"},
|
||||||
|
"pop_tiers.n_pops":{"one":"{n} POP","other":"{n} POPs"},
|
||||||
|
"pop_tiers.n_stuck":{"one":"{n} geht noch nicht","other":"{n} gehen noch nicht"},
|
||||||
|
"pop_tiers.no_kind":"Noch keine Art",
|
||||||
|
"pop_tiers.not_all":"In {city} ging nicht der ganze Standard rein. Schau in den Infra-Tab.",
|
||||||
|
"pop_tiers.not_set":"noch nicht festgelegt",
|
||||||
|
"pop_tiers.note":"Speichere die Router eines POPs als Standard und markiere dann andere POPs als diese Art. Auf Standard bringen fügt Router hinzu und tauscht auf das größere Modell, nie einen Schritt zurück. Unter Werkzeuge bringst du alle POPs einer Art auf einmal hoch.",
|
||||||
|
"pop_tiers.save_here":"Diese Router speichern",
|
||||||
|
"pop_tiers.saved":"{kind} ist jetzt {desc}.",
|
||||||
|
"pop_tiers.swapped_today":"Die Router hier wurden heute getauscht. Versuch es morgen wieder.",
|
||||||
|
"pop_tiers.this_pop_is":"Dieser POP: {kind}",
|
||||||
|
"pop_tiers.title":"POP-Standards",
|
||||||
"pops_transit_ix.40_off_for_6_months":"40 % Rabatt für 6 Monate",
|
"pops_transit_ix.40_off_for_6_months":"40 % Rabatt für 6 Monate",
|
||||||
"pops_transit_ix.40_off_ix_for_6_months":"<b>40 % Rabatt auf {ix} für 6 Monate.</b><br>Dein Account Manager ist erleichtert. Das Kleingedruckte liest du später.",
|
"pops_transit_ix.40_off_ix_for_6_months":"<b>40 % Rabatt auf {ix} für 6 Monate.</b><br>Dein Account Manager ist erleichtert. Das Kleingedruckte liest du später.",
|
||||||
"pops_transit_ix.after_consulting_with_management_the":"<b>„Nach Rücksprache mit dem Management …“</b><br>Der Preis ist gestiegen. Das Management wurde konsultiert.",
|
"pops_transit_ix.after_consulting_with_management_the":"<b>„Nach Rücksprache mit dem Management …“</b><br>Der Preis ist gestiegen. Das Management wurde konsultiert.",
|
||||||
|
|
@ -4200,6 +4227,12 @@
|
||||||
"release_notes.read_the_full_notes_on_github":"Alle Hinweise auf GitHub lesen",
|
"release_notes.read_the_full_notes_on_github":"Alle Hinweise auf GitHub lesen",
|
||||||
"release_notes.series_of_tubes_v_is_out":"Series of Tubes {v} ist da!",
|
"release_notes.series_of_tubes_v_is_out":"Series of Tubes {v} ist da!",
|
||||||
"release_notes.your_game_is_saved_automatically":"Dein Spiel wird automatisch gespeichert.",
|
"release_notes.your_game_is_saved_automatically":"Dein Spiel wird automatisch gespeichert.",
|
||||||
|
"req_fix.bought":"Gekauft: {list} für {cost}.",
|
||||||
|
"req_fix.buy_and_sign":"Kaufen und unterschreiben <small>{cost}</small>",
|
||||||
|
"req_fix.buys_list":"Es fehlt: {list}. {cost} + {mo}/Monat.",
|
||||||
|
"req_fix.generator_in_city":"ein Notstromaggregat in {city}",
|
||||||
|
"req_fix.second_router_in_city":"ein zweiter Router in {city}",
|
||||||
|
"req_fix.second_site_in_city":"ein zweiter Standort in {city}",
|
||||||
"requirements.a_spare_fiber_pair_in_your":"ein freies Faserpaar in deinem Graben {a}–{b}",
|
"requirements.a_spare_fiber_pair_in_your":"ein freies Faserpaar in deinem Graben {a}–{b}",
|
||||||
"requirements.afraid_of_sharks_needs_a_path":"Angst vor Haien: braucht einen Pfad ohne Seekabel",
|
"requirements.afraid_of_sharks_needs_a_path":"Angst vor Haien: braucht einen Pfad ohne Seekabel",
|
||||||
"requirements.backup_generator_in_every_city_they":"Notstromgenerator in jeder Stadt, in der sie vertreten sind",
|
"requirements.backup_generator_in_every_city_they":"Notstromgenerator in jeder Stadt, in der sie vertreten sind",
|
||||||
|
|
@ -4834,9 +4867,20 @@
|
||||||
"utilities.caches_requested":"{n} Cache-Boxen in {city} installiert.",
|
"utilities.caches_requested":"{n} Cache-Boxen in {city} installiert.",
|
||||||
"utilities.ix_peering":"IX-Peering im ganzen Netz",
|
"utilities.ix_peering":"IX-Peering im ganzen Netz",
|
||||||
"utilities.join_route_servers":"Allen Route Servern beitreten ({n})",
|
"utilities.join_route_servers":"Allen Route Servern beitreten ({n})",
|
||||||
|
"utilities.kit_all_applied":{"one":"Redundanz-Kit in {n} POP eingebaut.","other":"Redundanz-Kit in {n} POPs eingebaut."},
|
||||||
|
"utilities.kit_all_apply":{"one":"Kit in {n} POP <small>{cost}</small>","other":"Kit in alle {n} POPs <small>{cost}</small>"},
|
||||||
|
"utilities.kit_all_done":"Jeder POP hat das komplette Kit.",
|
||||||
|
"utilities.kit_all_quote":{"one":"{n} POP braucht es · {cost} + {mo}/Monat","other":"{n} POPs brauchen es · {cost} + {mo}/Monat"},
|
||||||
"utilities.kit_applied":"Redundanz in {city} aktualisiert.",
|
"utilities.kit_applied":"Redundanz in {city} aktualisiert.",
|
||||||
"utilities.kit_balanced":"Hardware installiert und Caches ausgeglichen.",
|
"utilities.kit_balanced":"Hardware installiert und Caches ausgeglichen.",
|
||||||
"utilities.kit_cost":"Einmalig: {cost} · Zusätzliche Kosten pro Monat: {mo}",
|
"utilities.kit_cost":"Einmalig: {cost} · Zusätzliche Kosten pro Monat: {mo}",
|
||||||
|
"utilities.kit_everywhere":"Redundanz-Kit überall",
|
||||||
|
"utilities.kit_everywhere_note":"Das Kit in jedem POP, dem noch ein Teil davon fehlt: Notstrom, zweites Gebäude, zweiter Router, Caches auf beide Standorte verteilt. Ein Preis für alle.",
|
||||||
|
"utilities.kit_new_pops_hire":"Stell einen NOC-Praktikanten ein, dann eröffnest du neue POPs aus einer Vorlage, das Kit schon drin.",
|
||||||
|
"utilities.kit_new_pops_off":"Neue POPs aus der Vorlage von {name} kommen ohne das Kit.",
|
||||||
|
"utilities.kit_new_pops_on":"Neue POPs aus der Vorlage von {name} bekommen das Kit gleich mit.",
|
||||||
|
"utilities.kit_new_pops_start":"Kit in die Vorlage",
|
||||||
|
"utilities.kit_new_pops_stop":"Kit aus der Vorlage nehmen",
|
||||||
"utilities.peer_counts":"{ready} möglich · {existing} bestehend · {blocked} nicht verfügbar",
|
"utilities.peer_counts":"{ready} möglich · {existing} bestehend · {blocked} nicht verfügbar",
|
||||||
"utilities.peering_note":"Fordert an jedem IX, an dem du bist, alle möglichen Peers an. Bestehende Sessions, auch über Route Server, werden übersprungen. Absagen und Traffic-Schwellen gelten weiter. Es werden keine Ports oder bezahlten PNIs gekauft.",
|
"utilities.peering_note":"Fordert an jedem IX, an dem du bist, alle möglichen Peers an. Bestehende Sessions, auch über Route Server, werden übersprungen. Absagen und Traffic-Schwellen gelten weiter. Es werden keine Ports oder bezahlten PNIs gekauft.",
|
||||||
"utilities.peers_requested":"{n} neue IX-Peering-Sessions aufgebaut.",
|
"utilities.peers_requested":"{n} neue IX-Peering-Sessions aufgebaut.",
|
||||||
|
|
|
||||||
|
|
@ -3165,6 +3165,9 @@
|
||||||
"modal_and_names.the_real_thing_follow_a_packet":"Lo de verdad: sigue un paquete del Wi-Fi a la fibra submarina.",
|
"modal_and_names.the_real_thing_follow_a_packet":"Lo de verdad: sigue un paquete del Wi-Fi a la fibra submarina.",
|
||||||
"modals.lay_your_own_subsea_cable":"Tender tu propio cable submarino…",
|
"modals.lay_your_own_subsea_cable":"Tender tu propio cable submarino…",
|
||||||
"modals.your_own_subsea_cable_level_n":"Tu propio cable submarino <small>nivel {n} o Tier 1</small>",
|
"modals.your_own_subsea_cable_level_n":"Tu propio cable submarino <small>nivel {n} o Tier 1</small>",
|
||||||
|
"net_filter.clear":"Borrar",
|
||||||
|
"net_filter.connected_only":"Solo conectadas",
|
||||||
|
"net_filter.find_a_network":"Buscar una red o número de AS",
|
||||||
"networks.a_mobile_network_named_after_the":"Una red móvil con el nombre del sonido de un brindis. Salud por cada torre 5G.",
|
"networks.a_mobile_network_named_after_the":"Una red móvil con el nombre del sonido de un brindis. Salud por cada torre 5G.",
|
||||||
"networks.a_spanish_carrier_starring_in_every":"Un operador español protagonista en todos los mercados latinoamericanos, al menos hasta que vende el siguiente.",
|
"networks.a_spanish_carrier_starring_in_every":"Un operador español protagonista en todos los mercados latinoamericanos, al menos hasta que vende el siguiente.",
|
||||||
"networks.a_tiny_telco_in_a_country":"Una telco diminuta en un país donde llegan a tierra los cables del mundo. Precios a juego.",
|
"networks.a_tiny_telco_in_a_country":"Una telco diminuta en un país donde llegan a tierra los cables del mundo. Precios a juego.",
|
||||||
|
|
@ -3400,6 +3403,7 @@
|
||||||
"ops.ops":"Ops",
|
"ops.ops":"Ops",
|
||||||
"ops.ops_name":"Ops · {name}",
|
"ops.ops_name":"Ops · {name}",
|
||||||
"ops.p_at":"Por encima de",
|
"ops.p_at":"Por encima de",
|
||||||
|
"ops.p_fresh":"Encender fibra nueva",
|
||||||
"ops.p_g":"Desde",
|
"ops.p_g":"Desde",
|
||||||
"ops.p_how":"Cómo",
|
"ops.p_how":"Cómo",
|
||||||
"ops.p_keep":"Dejar uno de reserva",
|
"ops.p_keep":"Dejar uno de reserva",
|
||||||
|
|
@ -3931,6 +3935,29 @@
|
||||||
"pop_std.none":"Ninguno",
|
"pop_std.none":"Ninguno",
|
||||||
"pop_std.not_all_of_the_standard":"No hay dinero o nivel para todo el estándar en {city}: recibió lo que cupo.",
|
"pop_std.not_all_of_the_standard":"No hay dinero o nivel para todo el estándar en {city}: recibió lo que cupo.",
|
||||||
"pop_std.standard_for_new_pops":"Estándar para nuevos POP",
|
"pop_std.standard_for_new_pops":"Estándar para nuevos POP",
|
||||||
|
"pop_tiers.apply_cost":"Ponerlo al día <small>{cost}</small>",
|
||||||
|
"pop_tiers.bring_up_n":{"one":"Poner al día {n} POP <small>{cost}</small>","other":"Poner al día {n} POPs <small>{cost}</small>"},
|
||||||
|
"pop_tiers.bulk_done":{"one":"{kind}: {n} POP puesto al día.","other":"{kind}: {n} POPs puestos al día."},
|
||||||
|
"pop_tiers.bulk_note":"Cada POP que marcaste de un tipo, puesto al día con su estándar de una vez. Cambia un estándar (un modelo nuevo, más routers) y vuelve a pulsar.",
|
||||||
|
"pop_tiers.city_is_kind":"{city} cumple el estándar {kind}.",
|
||||||
|
"pop_tiers.hub":"Hub regional",
|
||||||
|
"pop_tiers.mark":"Marcarlo",
|
||||||
|
"pop_tiers.medium":"POP mediano",
|
||||||
|
"pop_tiers.meets_it":"Lo cumple",
|
||||||
|
"pop_tiers.micro":"Micro POP",
|
||||||
|
"pop_tiers.model_locked":"{model} se desbloquea en el nivel de clientes {lv}.",
|
||||||
|
"pop_tiers.n_below":{"one":"{n} por debajo del estándar","other":"{n} por debajo del estándar"},
|
||||||
|
"pop_tiers.n_pops":{"one":"{n} POP","other":"{n} POPs"},
|
||||||
|
"pop_tiers.n_stuck":{"one":"{n} todavía no puede","other":"{n} todavía no pueden"},
|
||||||
|
"pop_tiers.no_kind":"Sin tipo aún",
|
||||||
|
"pop_tiers.not_all":"En {city} no entró todo el estándar. Revisa la pestaña Infra.",
|
||||||
|
"pop_tiers.not_set":"sin definir",
|
||||||
|
"pop_tiers.note":"Guarda los routers de un POP como estándar y marca otros POPs de ese tipo. Ponerlo al día añade routers y cambia al modelo más grande, nunca un paso atrás. En Utilidades pones al día todos los POPs de un tipo a la vez.",
|
||||||
|
"pop_tiers.save_here":"Guardar estos routers",
|
||||||
|
"pop_tiers.saved":"{kind} ahora es {desc}.",
|
||||||
|
"pop_tiers.swapped_today":"Los routers de aquí se cambiaron hoy. Prueba mañana.",
|
||||||
|
"pop_tiers.this_pop_is":"Este POP: {kind}",
|
||||||
|
"pop_tiers.title":"Estándares de POP",
|
||||||
"pops_transit_ix.40_off_for_6_months":"40 % de descuento durante 6 meses",
|
"pops_transit_ix.40_off_for_6_months":"40 % de descuento durante 6 meses",
|
||||||
"pops_transit_ix.40_off_ix_for_6_months":"<b>40 % de descuento en {ix} durante 6 meses.</b><br>Tu gestor de cuenta está aliviado. Lee la letra pequeña más tarde.",
|
"pops_transit_ix.40_off_ix_for_6_months":"<b>40 % de descuento en {ix} durante 6 meses.</b><br>Tu gestor de cuenta está aliviado. Lee la letra pequeña más tarde.",
|
||||||
"pops_transit_ix.after_consulting_with_management_the":"<b>«Tras consultar con la dirección…»</b><br>El precio subió. Se consultó a la dirección.",
|
"pops_transit_ix.after_consulting_with_management_the":"<b>«Tras consultar con la dirección…»</b><br>El precio subió. Se consultó a la dirección.",
|
||||||
|
|
@ -4198,6 +4225,12 @@
|
||||||
"release_notes.read_the_full_notes_on_github":"Lee las notas completas en GitHub",
|
"release_notes.read_the_full_notes_on_github":"Lee las notas completas en GitHub",
|
||||||
"release_notes.series_of_tubes_v_is_out":"¡Ya salió Series of Tubes {v}!",
|
"release_notes.series_of_tubes_v_is_out":"¡Ya salió Series of Tubes {v}!",
|
||||||
"release_notes.your_game_is_saved_automatically":"Tu partida se guarda automáticamente.",
|
"release_notes.your_game_is_saved_automatically":"Tu partida se guarda automáticamente.",
|
||||||
|
"req_fix.bought":"Comprado: {list} por {cost}.",
|
||||||
|
"req_fix.buy_and_sign":"Comprar y firmar <small>{cost}</small>",
|
||||||
|
"req_fix.buys_list":"Falta: {list}. {cost} + {mo}/mes.",
|
||||||
|
"req_fix.generator_in_city":"un generador de respaldo en {city}",
|
||||||
|
"req_fix.second_router_in_city":"un segundo router en {city}",
|
||||||
|
"req_fix.second_site_in_city":"un segundo sitio en {city}",
|
||||||
"requirements.a_spare_fiber_pair_in_your":"un par de fibra libre en tu zanja {a}–{b}",
|
"requirements.a_spare_fiber_pair_in_your":"un par de fibra libre en tu zanja {a}–{b}",
|
||||||
"requirements.afraid_of_sharks_needs_a_path":"Miedo a los tiburones: necesita una ruta sin cable submarino",
|
"requirements.afraid_of_sharks_needs_a_path":"Miedo a los tiburones: necesita una ruta sin cable submarino",
|
||||||
"requirements.backup_generator_in_every_city_they":"Generador de respaldo en cada ciudad que toquen",
|
"requirements.backup_generator_in_every_city_they":"Generador de respaldo en cada ciudad que toquen",
|
||||||
|
|
@ -4832,9 +4865,20 @@
|
||||||
"utilities.caches_requested":"Se han instalado {n} cachés en {city}.",
|
"utilities.caches_requested":"Se han instalado {n} cachés en {city}.",
|
||||||
"utilities.ix_peering":"Peering IX en toda la red",
|
"utilities.ix_peering":"Peering IX en toda la red",
|
||||||
"utilities.join_route_servers":"Unirse a todos los route servers ({n})",
|
"utilities.join_route_servers":"Unirse a todos los route servers ({n})",
|
||||||
|
"utilities.kit_all_applied":{"one":"Kit de redundancia instalado en {n} POP.","other":"Kit de redundancia instalado en {n} POPs."},
|
||||||
|
"utilities.kit_all_apply":{"one":"Kit en {n} POP <small>{cost}</small>","other":"Kit en los {n} POPs <small>{cost}</small>"},
|
||||||
|
"utilities.kit_all_done":"Todos los POPs tienen el kit completo.",
|
||||||
|
"utilities.kit_all_quote":{"one":"{n} POP lo necesita · {cost} + {mo}/mes","other":"{n} POPs lo necesitan · {cost} + {mo}/mes"},
|
||||||
"utilities.kit_applied":"Redundancia actualizada en {city}.",
|
"utilities.kit_applied":"Redundancia actualizada en {city}.",
|
||||||
"utilities.kit_balanced":"Hardware instalado y cachés equilibradas.",
|
"utilities.kit_balanced":"Hardware instalado y cachés equilibradas.",
|
||||||
"utilities.kit_cost":"Pago único: {cost} · Coste mensual adicional: {mo}",
|
"utilities.kit_cost":"Pago único: {cost} · Coste mensual adicional: {mo}",
|
||||||
|
"utilities.kit_everywhere":"Kit de redundancia en todas partes",
|
||||||
|
"utilities.kit_everywhere_note":"El kit en cada POP al que todavía le falta alguna parte: generador, segundo edificio, segundo router, cachés repartidas entre sitios. Un solo precio para todos.",
|
||||||
|
"utilities.kit_new_pops_hire":"Contrata a un becario del NOC para abrir POPs nuevos con una plantilla que ya incluye el kit.",
|
||||||
|
"utilities.kit_new_pops_off":"Los POPs nuevos abiertos con la plantilla de {name} llegan sin el kit.",
|
||||||
|
"utilities.kit_new_pops_on":"Los POPs nuevos abiertos con la plantilla de {name} también llevan el kit.",
|
||||||
|
"utilities.kit_new_pops_start":"Meter el kit en la plantilla",
|
||||||
|
"utilities.kit_new_pops_stop":"Sacarlo de la plantilla",
|
||||||
"utilities.peer_counts":"{ready} elegibles · {existing} existentes · {blocked} no disponibles",
|
"utilities.peer_counts":"{ready} elegibles · {existing} existentes · {blocked} no disponibles",
|
||||||
"utilities.peering_note":"Solicita peers elegibles en cada IX al que te hayas unido. Se omiten las sesiones existentes, incluidos los peers del route server. Los rechazos y umbrales de tráfico siguen vigentes. No se compran puertos ni PNI de pago.",
|
"utilities.peering_note":"Solicita peers elegibles en cada IX al que te hayas unido. Se omiten las sesiones existentes, incluidos los peers del route server. Los rechazos y umbrales de tráfico siguen vigentes. No se compran puertos ni PNI de pago.",
|
||||||
"utilities.peers_requested":"Se han establecido {n} nuevas sesiones de peering IX.",
|
"utilities.peers_requested":"Se han establecido {n} nuevas sesiones de peering IX.",
|
||||||
|
|
|
||||||
|
|
@ -3165,6 +3165,9 @@
|
||||||
"modal_and_names.the_real_thing_follow_a_packet":"La version réelle : suis un paquet du Wi-Fi à la fibre sous-marine.",
|
"modal_and_names.the_real_thing_follow_a_packet":"La version réelle : suis un paquet du Wi-Fi à la fibre sous-marine.",
|
||||||
"modals.lay_your_own_subsea_cable":"Pose ton propre câble sous-marin…",
|
"modals.lay_your_own_subsea_cable":"Pose ton propre câble sous-marin…",
|
||||||
"modals.your_own_subsea_cable_level_n":"Ton propre câble sous-marin <small>niveau {n} ou Tier 1</small>",
|
"modals.your_own_subsea_cable_level_n":"Ton propre câble sous-marin <small>niveau {n} ou Tier 1</small>",
|
||||||
|
"net_filter.clear":"Effacer",
|
||||||
|
"net_filter.connected_only":"Connectés seulement",
|
||||||
|
"net_filter.find_a_network":"Chercher un réseau ou un numéro d'AS",
|
||||||
"networks.a_mobile_network_named_after_the":"Un réseau mobile qui porte le nom du bruit d’un toast. Tchin-tchin à chaque antenne 5G.",
|
"networks.a_mobile_network_named_after_the":"Un réseau mobile qui porte le nom du bruit d’un toast. Tchin-tchin à chaque antenne 5G.",
|
||||||
"networks.a_spanish_carrier_starring_in_every":"Un opérateur espagnol en vedette sur chaque marché d’Amérique latine, au moins jusqu’à ce qu’il revende le suivant.",
|
"networks.a_spanish_carrier_starring_in_every":"Un opérateur espagnol en vedette sur chaque marché d’Amérique latine, au moins jusqu’à ce qu’il revende le suivant.",
|
||||||
"networks.a_tiny_telco_in_a_country":"Un tout petit opérateur dans un pays où les câbles du monde entier touchent terre. Tarifs à l’avenant.",
|
"networks.a_tiny_telco_in_a_country":"Un tout petit opérateur dans un pays où les câbles du monde entier touchent terre. Tarifs à l’avenant.",
|
||||||
|
|
@ -3400,6 +3403,7 @@
|
||||||
"ops.ops":"Ops",
|
"ops.ops":"Ops",
|
||||||
"ops.ops_name":"Ops · {name}",
|
"ops.ops_name":"Ops · {name}",
|
||||||
"ops.p_at":"Au-delà de",
|
"ops.p_at":"Au-delà de",
|
||||||
|
"ops.p_fresh":"Allumer la fibre neuve",
|
||||||
"ops.p_g":"À partir de",
|
"ops.p_g":"À partir de",
|
||||||
"ops.p_how":"Comment",
|
"ops.p_how":"Comment",
|
||||||
"ops.p_keep":"En garder un de secours",
|
"ops.p_keep":"En garder un de secours",
|
||||||
|
|
@ -3931,6 +3935,29 @@
|
||||||
"pop_std.none":"Aucun",
|
"pop_std.none":"Aucun",
|
||||||
"pop_std.not_all_of_the_standard":"Pas assez d'argent ou de niveau pour tout le standard à {city} : il a reçu ce qui passait.",
|
"pop_std.not_all_of_the_standard":"Pas assez d'argent ou de niveau pour tout le standard à {city} : il a reçu ce qui passait.",
|
||||||
"pop_std.standard_for_new_pops":"Standard des nouveaux POP",
|
"pop_std.standard_for_new_pops":"Standard des nouveaux POP",
|
||||||
|
"pop_tiers.apply_cost":"Le mettre à niveau <small>{cost}</small>",
|
||||||
|
"pop_tiers.bring_up_n":{"one":"Mettre {n} POP à niveau <small>{cost}</small>","other":"Mettre {n} POP à niveau <small>{cost}</small>"},
|
||||||
|
"pop_tiers.bulk_done":{"one":"{kind} : {n} POP mis à niveau.","other":"{kind} : {n} POP mis à niveau."},
|
||||||
|
"pop_tiers.bulk_note":"Chaque POP que tu as marqué d'un type, mis à niveau selon son standard d'un seul coup. Change un standard (nouveau modèle, plus de routeurs) et appuie à nouveau.",
|
||||||
|
"pop_tiers.city_is_kind":"{city} respecte le standard {kind}.",
|
||||||
|
"pop_tiers.hub":"Hub régional",
|
||||||
|
"pop_tiers.mark":"Le marquer",
|
||||||
|
"pop_tiers.medium":"POP moyen",
|
||||||
|
"pop_tiers.meets_it":"Conforme",
|
||||||
|
"pop_tiers.micro":"Micro-POP",
|
||||||
|
"pop_tiers.model_locked":"{model} se débloque au niveau clients {lv}.",
|
||||||
|
"pop_tiers.n_below":{"one":"{n} sous le standard","other":"{n} sous le standard"},
|
||||||
|
"pop_tiers.n_pops":{"one":"{n} POP","other":"{n} POP"},
|
||||||
|
"pop_tiers.n_stuck":{"one":"{n} ne peut pas encore","other":"{n} ne peuvent pas encore"},
|
||||||
|
"pop_tiers.no_kind":"Pas encore de type",
|
||||||
|
"pop_tiers.not_all":"Tout le standard n'a pas pu être installé à {city}. Regarde l'onglet Infra.",
|
||||||
|
"pop_tiers.not_set":"pas encore défini",
|
||||||
|
"pop_tiers.note":"Enregistre les routeurs d'un POP comme standard, puis marque d'autres POP de ce type. La mise à niveau ajoute des routeurs et passe au plus gros modèle, jamais un pas en arrière. Les Utilitaires mettent à niveau tous les POP d'un type d'un coup.",
|
||||||
|
"pop_tiers.save_here":"Enregistrer ces routeurs",
|
||||||
|
"pop_tiers.saved":"{kind} est maintenant {desc}.",
|
||||||
|
"pop_tiers.swapped_today":"Les routeurs ici ont été changés aujourd'hui. Réessaie demain.",
|
||||||
|
"pop_tiers.this_pop_is":"Ce POP : {kind}",
|
||||||
|
"pop_tiers.title":"Standards de POP",
|
||||||
"pops_transit_ix.40_off_for_6_months":"40 % de remise pendant 6 mois",
|
"pops_transit_ix.40_off_for_6_months":"40 % de remise pendant 6 mois",
|
||||||
"pops_transit_ix.40_off_ix_for_6_months":"<b>40 % de remise sur {ix} pendant 6 mois.</b><br>Ton account manager est soulagé. Lis les petites lignes plus tard.",
|
"pops_transit_ix.40_off_ix_for_6_months":"<b>40 % de remise sur {ix} pendant 6 mois.</b><br>Ton account manager est soulagé. Lis les petites lignes plus tard.",
|
||||||
"pops_transit_ix.after_consulting_with_management_the":"<b>« Après consultation de la direction… »</b><br>Le prix a augmenté. La direction a été consultée.",
|
"pops_transit_ix.after_consulting_with_management_the":"<b>« Après consultation de la direction… »</b><br>Le prix a augmenté. La direction a été consultée.",
|
||||||
|
|
@ -4198,6 +4225,12 @@
|
||||||
"release_notes.read_the_full_notes_on_github":"Lire les notes complètes sur GitHub",
|
"release_notes.read_the_full_notes_on_github":"Lire les notes complètes sur GitHub",
|
||||||
"release_notes.series_of_tubes_v_is_out":"Series of Tubes {v} est sorti !",
|
"release_notes.series_of_tubes_v_is_out":"Series of Tubes {v} est sorti !",
|
||||||
"release_notes.your_game_is_saved_automatically":"Ta partie est sauvegardée automatiquement.",
|
"release_notes.your_game_is_saved_automatically":"Ta partie est sauvegardée automatiquement.",
|
||||||
|
"req_fix.bought":"Acheté : {list} pour {cost}.",
|
||||||
|
"req_fix.buy_and_sign":"Acheter et signer <small>{cost}</small>",
|
||||||
|
"req_fix.buys_list":"Il manque : {list}. {cost} + {mo}/mois.",
|
||||||
|
"req_fix.generator_in_city":"un groupe électrogène à {city}",
|
||||||
|
"req_fix.second_router_in_city":"un second routeur à {city}",
|
||||||
|
"req_fix.second_site_in_city":"un second site à {city}",
|
||||||
"requirements.a_spare_fiber_pair_in_your":"une paire de fibre libre dans ta tranchée {a}–{b}",
|
"requirements.a_spare_fiber_pair_in_your":"une paire de fibre libre dans ta tranchée {a}–{b}",
|
||||||
"requirements.afraid_of_sharks_needs_a_path":"A peur des requins : veut un chemin sans câble sous-marin",
|
"requirements.afraid_of_sharks_needs_a_path":"A peur des requins : veut un chemin sans câble sous-marin",
|
||||||
"requirements.backup_generator_in_every_city_they":"Groupe électrogène dans chaque ville qu’il touche",
|
"requirements.backup_generator_in_every_city_they":"Groupe électrogène dans chaque ville qu’il touche",
|
||||||
|
|
@ -4832,9 +4865,20 @@
|
||||||
"utilities.caches_requested":"{n} caches installés à {city}.",
|
"utilities.caches_requested":"{n} caches installés à {city}.",
|
||||||
"utilities.ix_peering":"Peering IX sur tout le réseau",
|
"utilities.ix_peering":"Peering IX sur tout le réseau",
|
||||||
"utilities.join_route_servers":"Rejoindre tous les route servers ({n})",
|
"utilities.join_route_servers":"Rejoindre tous les route servers ({n})",
|
||||||
|
"utilities.kit_all_applied":{"one":"Kit de redondance installé dans {n} POP.","other":"Kit de redondance installé dans {n} POP."},
|
||||||
|
"utilities.kit_all_apply":{"one":"Kit pour {n} POP <small>{cost}</small>","other":"Kit pour les {n} POP <small>{cost}</small>"},
|
||||||
|
"utilities.kit_all_done":"Chaque POP a le kit complet.",
|
||||||
|
"utilities.kit_all_quote":{"one":"{n} POP en a besoin · {cost} + {mo}/mois","other":"{n} POP en ont besoin · {cost} + {mo}/mois"},
|
||||||
"utilities.kit_applied":"Redondance mise à jour à {city}.",
|
"utilities.kit_applied":"Redondance mise à jour à {city}.",
|
||||||
"utilities.kit_balanced":"Matériel installé et caches équilibrés.",
|
"utilities.kit_balanced":"Matériel installé et caches équilibrés.",
|
||||||
"utilities.kit_cost":"Coût initial : {cost} · Coût mensuel supplémentaire : {mo}",
|
"utilities.kit_cost":"Coût initial : {cost} · Coût mensuel supplémentaire : {mo}",
|
||||||
|
"utilities.kit_everywhere":"Kit de redondance partout",
|
||||||
|
"utilities.kit_everywhere_note":"Le kit dans chaque POP à qui il en manque une partie : groupe électrogène, second bâtiment, second routeur, caches répartis entre les sites. Un seul prix pour tous.",
|
||||||
|
"utilities.kit_new_pops_hire":"Embauche un stagiaire NOC pour ouvrir de nouveaux POP depuis un modèle, kit déjà compris.",
|
||||||
|
"utilities.kit_new_pops_off":"Les nouveaux POP ouverts avec le modèle de {name} arrivent sans le kit.",
|
||||||
|
"utilities.kit_new_pops_on":"Les nouveaux POP ouverts avec le modèle de {name} reçoivent aussi le kit.",
|
||||||
|
"utilities.kit_new_pops_start":"Mettre le kit dans le modèle",
|
||||||
|
"utilities.kit_new_pops_stop":"Le retirer du modèle",
|
||||||
"utilities.peer_counts":"{ready} éligibles · {existing} existants · {blocked} indisponibles",
|
"utilities.peer_counts":"{ready} éligibles · {existing} existants · {blocked} indisponibles",
|
||||||
"utilities.peering_note":"Demande les peers éligibles sur chaque IX rejoint. Les sessions existantes, y compris via le route server, sont ignorées. Les refus et seuils de trafic restent applicables. Aucun port ni PNI payant ne sera acheté.",
|
"utilities.peering_note":"Demande les peers éligibles sur chaque IX rejoint. Les sessions existantes, y compris via le route server, sont ignorées. Les refus et seuils de trafic restent applicables. Aucun port ni PNI payant ne sera acheté.",
|
||||||
"utilities.peers_requested":"{n} nouvelles sessions de peering IX établies.",
|
"utilities.peers_requested":"{n} nouvelles sessions de peering IX établies.",
|
||||||
|
|
|
||||||
|
|
@ -3165,6 +3165,9 @@
|
||||||
"modal_and_names.the_real_thing_follow_a_packet":"La versione vera: segui un pacchetto dal Wi-Fi alla fibra sottomarina.",
|
"modal_and_names.the_real_thing_follow_a_packet":"La versione vera: segui un pacchetto dal Wi-Fi alla fibra sottomarina.",
|
||||||
"modals.lay_your_own_subsea_cable":"Posa il tuo cavo sottomarino…",
|
"modals.lay_your_own_subsea_cable":"Posa il tuo cavo sottomarino…",
|
||||||
"modals.your_own_subsea_cable_level_n":"Il tuo cavo sottomarino <small>livello {n} o Tier 1</small>",
|
"modals.your_own_subsea_cable_level_n":"Il tuo cavo sottomarino <small>livello {n} o Tier 1</small>",
|
||||||
|
"net_filter.clear":"Cancella",
|
||||||
|
"net_filter.connected_only":"Solo collegate",
|
||||||
|
"net_filter.find_a_network":"Cerca una rete o un numero AS",
|
||||||
"networks.a_mobile_network_named_after_the":"Una rete mobile che porta il nome del suono di un brindisi. Cin cin a ogni antenna 5G.",
|
"networks.a_mobile_network_named_after_the":"Una rete mobile che porta il nome del suono di un brindisi. Cin cin a ogni antenna 5G.",
|
||||||
"networks.a_spanish_carrier_starring_in_every":"Un carrier spagnolo protagonista in ogni mercato latinoamericano, almeno finché non vende il prossimo.",
|
"networks.a_spanish_carrier_starring_in_every":"Un carrier spagnolo protagonista in ogni mercato latinoamericano, almeno finché non vende il prossimo.",
|
||||||
"networks.a_tiny_telco_in_a_country":"Una piccola telco in un paese dove approdano i cavi di mezzo mondo. Prezzi in proporzione.",
|
"networks.a_tiny_telco_in_a_country":"Una piccola telco in un paese dove approdano i cavi di mezzo mondo. Prezzi in proporzione.",
|
||||||
|
|
@ -3400,6 +3403,7 @@
|
||||||
"ops.ops":"Ops",
|
"ops.ops":"Ops",
|
||||||
"ops.ops_name":"Ops · {name}",
|
"ops.ops_name":"Ops · {name}",
|
||||||
"ops.p_at":"Oltre",
|
"ops.p_at":"Oltre",
|
||||||
|
"ops.p_fresh":"Accendi la fibra nuova",
|
||||||
"ops.p_g":"Da",
|
"ops.p_g":"Da",
|
||||||
"ops.p_how":"Come",
|
"ops.p_how":"Come",
|
||||||
"ops.p_keep":"Tienine uno di scorta",
|
"ops.p_keep":"Tienine uno di scorta",
|
||||||
|
|
@ -3931,6 +3935,29 @@
|
||||||
"pop_std.none":"Nessuno",
|
"pop_std.none":"Nessuno",
|
||||||
"pop_std.not_all_of_the_standard":"Non bastano soldi o livello per tutto lo standard a {city}: ha avuto quello che si poteva.",
|
"pop_std.not_all_of_the_standard":"Non bastano soldi o livello per tutto lo standard a {city}: ha avuto quello che si poteva.",
|
||||||
"pop_std.standard_for_new_pops":"Standard per i nuovi POP",
|
"pop_std.standard_for_new_pops":"Standard per i nuovi POP",
|
||||||
|
"pop_tiers.apply_cost":"Portalo allo standard <small>{cost}</small>",
|
||||||
|
"pop_tiers.bring_up_n":{"one":"Porta {n} POP allo standard <small>{cost}</small>","other":"Porta {n} POP allo standard <small>{cost}</small>"},
|
||||||
|
"pop_tiers.bulk_done":{"one":"{kind}: {n} POP portato allo standard.","other":"{kind}: {n} POP portati allo standard."},
|
||||||
|
"pop_tiers.bulk_note":"Ogni POP che hai segnato di un tipo, portato al suo standard in un colpo solo. Cambia uno standard (un modello nuovo, più router) e premi di nuovo.",
|
||||||
|
"pop_tiers.city_is_kind":"{city} rispetta lo standard {kind}.",
|
||||||
|
"pop_tiers.hub":"Hub regionale",
|
||||||
|
"pop_tiers.mark":"Segnalo",
|
||||||
|
"pop_tiers.medium":"POP medio",
|
||||||
|
"pop_tiers.meets_it":"In regola",
|
||||||
|
"pop_tiers.micro":"Micro POP",
|
||||||
|
"pop_tiers.model_locked":"{model} si sblocca al livello clienti {lv}.",
|
||||||
|
"pop_tiers.n_below":{"one":"{n} sotto lo standard","other":"{n} sotto lo standard"},
|
||||||
|
"pop_tiers.n_pops":{"one":"{n} POP","other":"{n} POP"},
|
||||||
|
"pop_tiers.n_stuck":{"one":"{n} non può ancora","other":"{n} non possono ancora"},
|
||||||
|
"pop_tiers.no_kind":"Nessun tipo ancora",
|
||||||
|
"pop_tiers.not_all":"A {city} non è entrato tutto lo standard. Controlla la scheda Infra.",
|
||||||
|
"pop_tiers.not_set":"non ancora definito",
|
||||||
|
"pop_tiers.note":"Salva i router di un POP come standard, poi segna altri POP di quel tipo. Portarlo allo standard aggiunge router e passa al modello più grande, mai un passo indietro. Da Utilità porti allo standard tutti i POP di un tipo in una volta.",
|
||||||
|
"pop_tiers.save_here":"Salva questi router",
|
||||||
|
"pop_tiers.saved":"{kind} ora è {desc}.",
|
||||||
|
"pop_tiers.swapped_today":"I router qui sono stati cambiati oggi. Riprova domani.",
|
||||||
|
"pop_tiers.this_pop_is":"Questo POP: {kind}",
|
||||||
|
"pop_tiers.title":"Standard dei POP",
|
||||||
"pops_transit_ix.40_off_for_6_months":"40% di sconto per 6 mesi",
|
"pops_transit_ix.40_off_for_6_months":"40% di sconto per 6 mesi",
|
||||||
"pops_transit_ix.40_off_ix_for_6_months":"<b>40% di sconto su {ix} per 6 mesi.</b><br>Il tuo account manager tira un sospiro di sollievo. Le clausole in piccolo leggile dopo.",
|
"pops_transit_ix.40_off_ix_for_6_months":"<b>40% di sconto su {ix} per 6 mesi.</b><br>Il tuo account manager tira un sospiro di sollievo. Le clausole in piccolo leggile dopo.",
|
||||||
"pops_transit_ix.after_consulting_with_management_the":"<b>“Dopo un confronto con il management…”</b><br>Il prezzo è salito. Il management è stato consultato.",
|
"pops_transit_ix.after_consulting_with_management_the":"<b>“Dopo un confronto con il management…”</b><br>Il prezzo è salito. Il management è stato consultato.",
|
||||||
|
|
@ -4198,6 +4225,12 @@
|
||||||
"release_notes.read_the_full_notes_on_github":"Leggi le note complete su GitHub",
|
"release_notes.read_the_full_notes_on_github":"Leggi le note complete su GitHub",
|
||||||
"release_notes.series_of_tubes_v_is_out":"È uscito Series of Tubes {v}!",
|
"release_notes.series_of_tubes_v_is_out":"È uscito Series of Tubes {v}!",
|
||||||
"release_notes.your_game_is_saved_automatically":"La tua partita viene salvata automaticamente.",
|
"release_notes.your_game_is_saved_automatically":"La tua partita viene salvata automaticamente.",
|
||||||
|
"req_fix.bought":"Comprato: {list} per {cost}.",
|
||||||
|
"req_fix.buy_and_sign":"Compra e firma <small>{cost}</small>",
|
||||||
|
"req_fix.buys_list":"Manca: {list}. {cost} + {mo}/mese.",
|
||||||
|
"req_fix.generator_in_city":"un generatore di backup a {city}",
|
||||||
|
"req_fix.second_router_in_city":"un secondo router a {city}",
|
||||||
|
"req_fix.second_site_in_city":"un secondo sito a {city}",
|
||||||
"requirements.a_spare_fiber_pair_in_your":"una coppia di fibre libera nel tuo scavo {a}–{b}",
|
"requirements.a_spare_fiber_pair_in_your":"una coppia di fibre libera nel tuo scavo {a}–{b}",
|
||||||
"requirements.afraid_of_sharks_needs_a_path":"Ha paura degli squali: vuole un percorso senza cavi sottomarini",
|
"requirements.afraid_of_sharks_needs_a_path":"Ha paura degli squali: vuole un percorso senza cavi sottomarini",
|
||||||
"requirements.backup_generator_in_every_city_they":"Generatore di backup in ogni città che tocca",
|
"requirements.backup_generator_in_every_city_they":"Generatore di backup in ogni città che tocca",
|
||||||
|
|
@ -4832,9 +4865,20 @@
|
||||||
"utilities.caches_requested":"Installate {n} cache a {city}.",
|
"utilities.caches_requested":"Installate {n} cache a {city}.",
|
||||||
"utilities.ix_peering":"Peering IX su tutta la rete",
|
"utilities.ix_peering":"Peering IX su tutta la rete",
|
||||||
"utilities.join_route_servers":"Unisciti a tutti i route server ({n})",
|
"utilities.join_route_servers":"Unisciti a tutti i route server ({n})",
|
||||||
|
"utilities.kit_all_applied":{"one":"Kit di ridondanza installato in {n} POP.","other":"Kit di ridondanza installato in {n} POP."},
|
||||||
|
"utilities.kit_all_apply":{"one":"Kit per {n} POP <small>{cost}</small>","other":"Kit per tutti i {n} POP <small>{cost}</small>"},
|
||||||
|
"utilities.kit_all_done":"Ogni POP ha il kit completo.",
|
||||||
|
"utilities.kit_all_quote":{"one":"{n} POP ne ha bisogno · {cost} + {mo}/mese","other":"{n} POP ne hanno bisogno · {cost} + {mo}/mese"},
|
||||||
"utilities.kit_applied":"Ridondanza aggiornata a {city}.",
|
"utilities.kit_applied":"Ridondanza aggiornata a {city}.",
|
||||||
"utilities.kit_balanced":"Hardware installato e cache bilanciate.",
|
"utilities.kit_balanced":"Hardware installato e cache bilanciate.",
|
||||||
"utilities.kit_cost":"Una tantum: {cost} · Costo mensile aggiuntivo: {mo}",
|
"utilities.kit_cost":"Una tantum: {cost} · Costo mensile aggiuntivo: {mo}",
|
||||||
|
"utilities.kit_everywhere":"Kit di ridondanza ovunque",
|
||||||
|
"utilities.kit_everywhere_note":"Il kit in ogni POP a cui ne manca ancora un pezzo: generatore, secondo edificio, secondo router, cache divise tra i siti. Un solo prezzo per tutti.",
|
||||||
|
"utilities.kit_new_pops_hire":"Assumi uno stagista del NOC per aprire nuovi POP da un modello con il kit già dentro.",
|
||||||
|
"utilities.kit_new_pops_off":"I nuovi POP aperti dal modello di {name} arrivano senza kit.",
|
||||||
|
"utilities.kit_new_pops_on":"I nuovi POP aperti dal modello di {name} ricevono anche il kit.",
|
||||||
|
"utilities.kit_new_pops_start":"Metti il kit nel modello",
|
||||||
|
"utilities.kit_new_pops_stop":"Toglilo dal modello",
|
||||||
"utilities.peer_counts":"{ready} idonei · {existing} esistenti · {blocked} non disponibili",
|
"utilities.peer_counts":"{ready} idonei · {existing} esistenti · {blocked} non disponibili",
|
||||||
"utilities.peering_note":"Richiedi i peer idonei in ogni IX a cui partecipi. Le sessioni esistenti, inclusi i peer del route server, vengono saltate. Rifiuti e soglie di traffico restano validi. Non vengono acquistate porte o PNI a pagamento.",
|
"utilities.peering_note":"Richiedi i peer idonei in ogni IX a cui partecipi. Le sessioni esistenti, inclusi i peer del route server, vengono saltate. Rifiuti e soglie di traffico restano validi. Non vengono acquistate porte o PNI a pagamento.",
|
||||||
"utilities.peers_requested":"Stabilite {n} nuove sessioni di peering IX.",
|
"utilities.peers_requested":"Stabilite {n} nuove sessioni di peering IX.",
|
||||||
|
|
|
||||||
|
|
@ -3165,6 +3165,9 @@
|
||||||
"modal_and_names.the_real_thing_follow_a_packet":"A coisa de verdade: siga um pacote do Wi-Fi até a fibra submarina.",
|
"modal_and_names.the_real_thing_follow_a_packet":"A coisa de verdade: siga um pacote do Wi-Fi até a fibra submarina.",
|
||||||
"modals.lay_your_own_subsea_cable":"Lançar seu próprio cabo submarino…",
|
"modals.lay_your_own_subsea_cable":"Lançar seu próprio cabo submarino…",
|
||||||
"modals.your_own_subsea_cable_level_n":"Seu próprio cabo submarino <small>nível {n} ou Tier 1</small>",
|
"modals.your_own_subsea_cable_level_n":"Seu próprio cabo submarino <small>nível {n} ou Tier 1</small>",
|
||||||
|
"net_filter.clear":"Limpar",
|
||||||
|
"net_filter.connected_only":"Só ligadas",
|
||||||
|
"net_filter.find_a_network":"Procurar uma rede ou número AS",
|
||||||
"networks.a_mobile_network_named_after_the":"Uma rede móvel com nome de brinde. Tim-tim para cada torre 5G.",
|
"networks.a_mobile_network_named_after_the":"Uma rede móvel com nome de brinde. Tim-tim para cada torre 5G.",
|
||||||
"networks.a_spanish_carrier_starring_in_every":"Uma operadora espanhola estrelando em todo mercado latino-americano, pelo menos até vender o próximo.",
|
"networks.a_spanish_carrier_starring_in_every":"Uma operadora espanhola estrelando em todo mercado latino-americano, pelo menos até vender o próximo.",
|
||||||
"networks.a_tiny_telco_in_a_country":"Uma operadora minúscula num país onde os cabos do mundo chegam à terra. Os preços acompanham.",
|
"networks.a_tiny_telco_in_a_country":"Uma operadora minúscula num país onde os cabos do mundo chegam à terra. Os preços acompanham.",
|
||||||
|
|
@ -3400,6 +3403,7 @@
|
||||||
"ops.ops":"Ops",
|
"ops.ops":"Ops",
|
||||||
"ops.ops_name":"Ops · {name}",
|
"ops.ops_name":"Ops · {name}",
|
||||||
"ops.p_at":"Acima de",
|
"ops.p_at":"Acima de",
|
||||||
|
"ops.p_fresh":"Acender fibra nova",
|
||||||
"ops.p_g":"A partir de",
|
"ops.p_g":"A partir de",
|
||||||
"ops.p_how":"Como",
|
"ops.p_how":"Como",
|
||||||
"ops.p_keep":"Manter um de reserva",
|
"ops.p_keep":"Manter um de reserva",
|
||||||
|
|
@ -3931,6 +3935,29 @@
|
||||||
"pop_std.none":"Nenhum",
|
"pop_std.none":"Nenhum",
|
||||||
"pop_std.not_all_of_the_standard":"Sem dinheiro ou nível para todo o padrão em {city}: recebeu o que coube.",
|
"pop_std.not_all_of_the_standard":"Sem dinheiro ou nível para todo o padrão em {city}: recebeu o que coube.",
|
||||||
"pop_std.standard_for_new_pops":"Padrão para novos POPs",
|
"pop_std.standard_for_new_pops":"Padrão para novos POPs",
|
||||||
|
"pop_tiers.apply_cost":"Pôr no padrão <small>{cost}</small>",
|
||||||
|
"pop_tiers.bring_up_n":{"one":"Pôr {n} POP no padrão <small>{cost}</small>","other":"Pôr {n} POPs no padrão <small>{cost}</small>"},
|
||||||
|
"pop_tiers.bulk_done":{"one":"{kind}: {n} POP posto no padrão.","other":"{kind}: {n} POPs postos no padrão."},
|
||||||
|
"pop_tiers.bulk_note":"Cada POP que marcaste de um tipo, posto no seu padrão de uma só vez. Muda um padrão (um modelo novo, mais routers) e carrega outra vez.",
|
||||||
|
"pop_tiers.city_is_kind":"{city} cumpre o padrão {kind}.",
|
||||||
|
"pop_tiers.hub":"Hub regional",
|
||||||
|
"pop_tiers.mark":"Marcar",
|
||||||
|
"pop_tiers.medium":"POP médio",
|
||||||
|
"pop_tiers.meets_it":"Cumpre",
|
||||||
|
"pop_tiers.micro":"Micro POP",
|
||||||
|
"pop_tiers.model_locked":"{model} desbloqueia no nível de clientes {lv}.",
|
||||||
|
"pop_tiers.n_below":{"one":"{n} abaixo do padrão","other":"{n} abaixo do padrão"},
|
||||||
|
"pop_tiers.n_pops":{"one":"{n} POP","other":"{n} POPs"},
|
||||||
|
"pop_tiers.n_stuck":{"one":"{n} ainda não pode","other":"{n} ainda não podem"},
|
||||||
|
"pop_tiers.no_kind":"Ainda sem tipo",
|
||||||
|
"pop_tiers.not_all":"Nem todo o padrão entrou em {city}. Vê o separador Infra.",
|
||||||
|
"pop_tiers.not_set":"ainda não definido",
|
||||||
|
"pop_tiers.note":"Guarda os routers de um POP como padrão e depois marca outros POPs desse tipo. Pôr no padrão adiciona routers e troca para o modelo maior, nunca um passo atrás. Em Utilitários pões todos os POPs de um tipo no padrão de uma vez.",
|
||||||
|
"pop_tiers.save_here":"Guardar estes routers",
|
||||||
|
"pop_tiers.saved":"{kind} agora é {desc}.",
|
||||||
|
"pop_tiers.swapped_today":"Os routers aqui foram trocados hoje. Tenta amanhã.",
|
||||||
|
"pop_tiers.this_pop_is":"Este POP: {kind}",
|
||||||
|
"pop_tiers.title":"Padrões de POP",
|
||||||
"pops_transit_ix.40_off_for_6_months":"40% de desconto por 6 meses",
|
"pops_transit_ix.40_off_for_6_months":"40% de desconto por 6 meses",
|
||||||
"pops_transit_ix.40_off_ix_for_6_months":"<b>40% de desconto no {ix} por 6 meses.</b><br>Seu account manager respirou aliviado. Leia as letras miúdas depois.",
|
"pops_transit_ix.40_off_ix_for_6_months":"<b>40% de desconto no {ix} por 6 meses.</b><br>Seu account manager respirou aliviado. Leia as letras miúdas depois.",
|
||||||
"pops_transit_ix.after_consulting_with_management_the":"<b>“Depois de consultar a diretoria…”</b><br>O preço subiu. A diretoria foi consultada.",
|
"pops_transit_ix.after_consulting_with_management_the":"<b>“Depois de consultar a diretoria…”</b><br>O preço subiu. A diretoria foi consultada.",
|
||||||
|
|
@ -4198,6 +4225,12 @@
|
||||||
"release_notes.read_the_full_notes_on_github":"Leia as notas completas no GitHub",
|
"release_notes.read_the_full_notes_on_github":"Leia as notas completas no GitHub",
|
||||||
"release_notes.series_of_tubes_v_is_out":"Saiu o Series of Tubes {v}!",
|
"release_notes.series_of_tubes_v_is_out":"Saiu o Series of Tubes {v}!",
|
||||||
"release_notes.your_game_is_saved_automatically":"Seu jogo é salvo automaticamente.",
|
"release_notes.your_game_is_saved_automatically":"Seu jogo é salvo automaticamente.",
|
||||||
|
"req_fix.bought":"Comprado: {list} por {cost}.",
|
||||||
|
"req_fix.buy_and_sign":"Comprar e assinar <small>{cost}</small>",
|
||||||
|
"req_fix.buys_list":"Falta: {list}. {cost} + {mo}/mês.",
|
||||||
|
"req_fix.generator_in_city":"um gerador de backup em {city}",
|
||||||
|
"req_fix.second_router_in_city":"um segundo router em {city}",
|
||||||
|
"req_fix.second_site_in_city":"um segundo site em {city}",
|
||||||
"requirements.a_spare_fiber_pair_in_your":"um par de fibra livre na sua vala {a}–{b}",
|
"requirements.a_spare_fiber_pair_in_your":"um par de fibra livre na sua vala {a}–{b}",
|
||||||
"requirements.afraid_of_sharks_needs_a_path":"Tem medo de tubarão: quer um caminho sem cabo submarino",
|
"requirements.afraid_of_sharks_needs_a_path":"Tem medo de tubarão: quer um caminho sem cabo submarino",
|
||||||
"requirements.backup_generator_in_every_city_they":"Gerador de backup em toda cidade que tocar",
|
"requirements.backup_generator_in_every_city_they":"Gerador de backup em toda cidade que tocar",
|
||||||
|
|
@ -4832,9 +4865,20 @@
|
||||||
"utilities.caches_requested":"Instaladas {n} caches em {city}.",
|
"utilities.caches_requested":"Instaladas {n} caches em {city}.",
|
||||||
"utilities.ix_peering":"Peering IX em toda a rede",
|
"utilities.ix_peering":"Peering IX em toda a rede",
|
||||||
"utilities.join_route_servers":"Aderir a todos os route servers ({n})",
|
"utilities.join_route_servers":"Aderir a todos os route servers ({n})",
|
||||||
|
"utilities.kit_all_applied":{"one":"Kit de redundância instalado em {n} POP.","other":"Kit de redundância instalado em {n} POPs."},
|
||||||
|
"utilities.kit_all_apply":{"one":"Kit em {n} POP <small>{cost}</small>","other":"Kit nos {n} POPs <small>{cost}</small>"},
|
||||||
|
"utilities.kit_all_done":"Todos os POPs têm o kit completo.",
|
||||||
|
"utilities.kit_all_quote":{"one":"{n} POP precisa · {cost} + {mo}/mês","other":"{n} POPs precisam · {cost} + {mo}/mês"},
|
||||||
"utilities.kit_applied":"Redundância atualizada em {city}.",
|
"utilities.kit_applied":"Redundância atualizada em {city}.",
|
||||||
"utilities.kit_balanced":"Hardware instalado e caches equilibradas.",
|
"utilities.kit_balanced":"Hardware instalado e caches equilibradas.",
|
||||||
"utilities.kit_cost":"Custo único: {cost} · Custo mensal adicional: {mo}",
|
"utilities.kit_cost":"Custo único: {cost} · Custo mensal adicional: {mo}",
|
||||||
|
"utilities.kit_everywhere":"Kit de redundância em todo lado",
|
||||||
|
"utilities.kit_everywhere_note":"O kit em cada POP a que ainda falta alguma parte: gerador, segundo prédio, segundo router, caches divididos entre sites. Um só preço para todos.",
|
||||||
|
"utilities.kit_new_pops_hire":"Contrata um estagiário do NOC para abrir POPs novos a partir de um modelo, já com o kit.",
|
||||||
|
"utilities.kit_new_pops_off":"POPs novos abertos com o modelo de {name} vêm sem o kit.",
|
||||||
|
"utilities.kit_new_pops_on":"POPs novos abertos com o modelo de {name} também levam o kit.",
|
||||||
|
"utilities.kit_new_pops_start":"Pôr o kit no modelo",
|
||||||
|
"utilities.kit_new_pops_stop":"Tirá-lo do modelo",
|
||||||
"utilities.peer_counts":"{ready} elegíveis · {existing} existentes · {blocked} indisponíveis",
|
"utilities.peer_counts":"{ready} elegíveis · {existing} existentes · {blocked} indisponíveis",
|
||||||
"utilities.peering_note":"Solicita peers elegíveis em todos os IX a que aderiste. As sessões existentes, incluindo peers do route server, são ignoradas. Recusas e limites de tráfego continuam a aplicar-se. Não são compradas portas nem PNI pagos.",
|
"utilities.peering_note":"Solicita peers elegíveis em todos os IX a que aderiste. As sessões existentes, incluindo peers do route server, são ignoradas. Recusas e limites de tráfego continuam a aplicar-se. Não são compradas portas nem PNI pagos.",
|
||||||
"utilities.peers_requested":"Estabelecidas {n} novas sessões de peering IX.",
|
"utilities.peers_requested":"Estabelecidas {n} novas sessões de peering IX.",
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ const API_DOMAINS={
|
||||||
opsKey:{table:'OPSK',kind:'key'},
|
opsKey:{table:'OPSK',kind:'key'},
|
||||||
opsPopKind:{kind:'enum',values:()=>OPS_POP.slice()},
|
opsPopKind:{kind:'enum',values:()=>OPS_POP.slice()},
|
||||||
opsTplKey:{kind:'enum',values:()=>OPS_TPL.slice()},
|
opsTplKey:{kind:'enum',values:()=>OPS_TPL.slice()},
|
||||||
|
// The three POP standards (#315).
|
||||||
|
popTier:{kind:'enum',values:()=>POP_TIERS.slice()},
|
||||||
// The specialist's offers: a seat on a consortium cable, the charter, a vendor demo.
|
// The specialist's offers: a seat on a consortium cable, the charter, a vendor demo.
|
||||||
seatPairs:{kind:'enum',values:()=>SEAT_N.slice()},
|
seatPairs:{kind:'enum',values:()=>SEAT_N.slice()},
|
||||||
callAmount:{kind:'enum',values:()=>CALL_AMTS.slice()},
|
callAmount:{kind:'enum',values:()=>CALL_AMTS.slice()},
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,10 @@ const API_CMD={
|
||||||
/* ---------- customers ---------- */
|
/* ---------- customers ---------- */
|
||||||
accept:{args:[['id','entityId']],
|
accept:{args:[['id','entityId']],
|
||||||
doc:'Sign a pending offer. Rejected without a POP in every city it needs, without free channels for a wave sale, or after an event\'s start date. Extra waves for a carrier you already serve grow that contract.'},
|
doc:'Sign a pending offer. Rejected without a POP in every city it needs, without free channels for a wave sale, or after an event\'s start date. Extra waves for a carrier you already serve grow that contract.'},
|
||||||
|
acceptFix:{args:[['id','entityId'],['cost','integer',false]],watch:['pops','biz','offers'],
|
||||||
|
quote:a=>{const q=S?reqFix(S.offers.find(x=>x.id===a.id)):null;return q?{setup:q.cost,monthly:q.mo}:{setup:0};},
|
||||||
|
pass:a=>({id:a.id,cost:a.cost??((reqFix(S.offers.find(x=>x.id===a.id))||{}).cost)}),
|
||||||
|
doc:'Buy what an offer asks for at POPs you already have (backup generator, a second router, a second site), then sign it. Pass the quoted setup as cost; the game checks it still matches.'},
|
||||||
decline:{args:[['id','entityId']],
|
decline:{args:[['id','entityId']],
|
||||||
doc:'Throw an offer away.'},
|
doc:'Throw an offer away.'},
|
||||||
salesHire:{args:[['id','salesPersona']],
|
salesHire:{args:[['id','salesPersona']],
|
||||||
|
|
@ -402,6 +406,22 @@ const API_CMD={
|
||||||
quote:a=>{const q=S?utilityKit(a.city):null;return q?{setup:q.cost,monthly:q.mo}:{};},
|
quote:a=>{const q=S?utilityKit(a.city):null;return q?{setup:q.cost,monthly:q.mo}:{};},
|
||||||
pass:a=>({city:a.city,cost:a.cost??((utilityKit(a.city)||{}).cost)}),
|
pass:a=>({city:a.city,cost:a.cost??((utilityKit(a.city)||{}).cost)}),
|
||||||
doc:'Install the POP redundancy kit in one go: generator, second building, a second router, and the cache boxes balanced between sites. Pass the quoted setup as cost; the game checks it still matches. Nothing to do reads as no_effect.'},
|
doc:'Install the POP redundancy kit in one go: generator, second building, a second router, and the cache boxes balanced between sites. Pass the quoted setup as cost; the game checks it still matches. Nothing to do reads as no_effect.'},
|
||||||
|
utilityKitAll:{args:[['cost','integer',false],['city','cityId',false]],watch:['pops','caches'],
|
||||||
|
quote:a=>{const q=S?utilityKitAll():null;return q?{setup:q.cost,monthly:q.mo}:{setup:0};},
|
||||||
|
pass:a=>({city:a.city,cost:a.cost??((utilityKitAll()||{}).cost)}),
|
||||||
|
doc:'Install the redundancy kit at every POP still missing part of it, at one quoted price. From customer level 2. Pass the quoted setup as cost.'},
|
||||||
|
utilityKitNew:{args:[['city','cityId',false]],watch:['ops'],
|
||||||
|
doc:'Put the redundancy kit in the intern\'s new-POP template, or take it out (the same switch as in the Ops sheet).'},
|
||||||
|
ptSave:{args:[['city','cityId'],['k','popTier']],watch:['popTiers'],
|
||||||
|
doc:'Save a POP\'s routers (model and count) as one of three POP standards: micro, medium or hub. The POP is marked as that kind. From customer level 2.'},
|
||||||
|
ptApply:{args:[['city','cityId'],['k','popTier'],['cost','integer',false]],watch:['pops.#city','popTiers'],
|
||||||
|
quote:a=>{const q=S?ptPlan(a.city,a.k):null;return q?{setup:q.cost,monthly:q.mo,blocked:q.why?[q.why]:[]}:{setup:0};},
|
||||||
|
pass:a=>({city:a.city,k:a.k,cost:a.cost??((S&&ptPlan(a.city,a.k))||{cost:0}).cost}),
|
||||||
|
doc:'Mark a POP as one kind and bring its routers up to that standard: add routers, swap to the standard\'s model if it is bigger. Never a step down. Pass the quoted setup as cost.'},
|
||||||
|
ptAll:{args:[['k','popTier'],['cost','integer',false],['city','cityId',false]],watch:['pops','popTiers'],
|
||||||
|
quote:a=>{const A=S?ptAll(a.k):null;return A?{setup:A.cost}:{setup:0};},
|
||||||
|
pass:a=>({k:a.k,city:a.city,cost:a.cost??(ptAll(a.k)||{}).cost}),
|
||||||
|
doc:'Bring every POP marked as one kind up to that standard, at one quoted price. Pass the quoted setup as cost.'},
|
||||||
utilityCaches:{args:[['city','cityId'],['quote','string',false]],watch:['caches'],
|
utilityCaches:{args:[['city','cityId'],['quote','string',false]],watch:['caches'],
|
||||||
quote:a=>{const q=S?utilityCaches(a.city):null;return q?{key:q.key}:{};},
|
quote:a=>{const q=S?utilityCaches(a.city):null;return q?{key:q.key}:{};},
|
||||||
pass:a=>({city:a.city,quote:a.quote??((utilityCaches(a.city)||{}).key)}),
|
pass:a=>({city:a.city,quote:a.quote??((utilityCaches(a.city)||{}).key)}),
|
||||||
|
|
@ -530,6 +550,9 @@ const API_VIEW={
|
||||||
pniFilter:{args:[['f','pniFilter']],doc:'Filter the PNI list: all, via transit, worth it, already PNI.'},
|
pniFilter:{args:[['f','pniFilter']],doc:'Filter the PNI list: all, via transit, worth it, already PNI.'},
|
||||||
pniGrp:{args:[['g','string'],['o','boolean',false]],doc:'Fold or unfold one group of the PNI list.'},
|
pniGrp:{args:[['g','string'],['o','boolean',false]],doc:'Fold or unfold one group of the PNI list.'},
|
||||||
pniSort:{args:[],doc:'Flip the PNI list sort between A-Z and worth-it-first.'},
|
pniSort:{args:[],doc:'Flip the PNI list sort between A-Z and worth-it-first.'},
|
||||||
|
netFind:{args:[['q','string']],doc:'Filter a POP\'s transit, exchange, PNI and cache lists by network name or AS number.'},
|
||||||
|
netOnly:{args:[],doc:'Show only the networks you are connected to in a POP\'s lists, or all of them again.'},
|
||||||
|
netClear:{args:[],doc:'Clear the network search and the connected-only switch.'},
|
||||||
puzzleMenu:{args:[],doc:'Open the puzzle list.'},
|
puzzleMenu:{args:[],doc:'Open the puzzle list.'},
|
||||||
puzzleDoor:{args:[],doc:'From the title screen: open the puzzle list (keeps the typed name).'},
|
puzzleDoor:{args:[],doc:'From the title screen: open the puzzle list (keeps the typed name).'},
|
||||||
pzFinish:{args:[],doc:'Puzzles only: run the star count and show the results sheet.'},
|
pzFinish:{args:[],doc:'Puzzles only: run the star count and show the results sheet.'},
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ const API_STATE_DOC={
|
||||||
core:{type:'map',doc:'Your backbone technology: lv bought, the level it runs at, the interop lab.'},
|
core:{type:'map',doc:'Your backbone technology: lv bought, the level it runs at, the interop lab.'},
|
||||||
ddosAuto:{type:'map',doc:'The NOC\'s auto-mitigation switches: rtbh and scrub.'},
|
ddosAuto:{type:'map',doc:'The NOC\'s auto-mitigation switches: rtbh and scrub.'},
|
||||||
popStd:{type:'map',doc:'The standard POP: router model and count new POPs start with, or null for none.'},
|
popStd:{type:'map',doc:'The standard POP: router model and count new POPs start with, or null for none.'},
|
||||||
|
popTiers:{type:'map',doc:'POP standards by kind: def.micro|medium|hub is {g: router model, rt: routers} or null; at maps a POP city to its kind.'},
|
||||||
demo:{type:'map',doc:'Vendor demo units on order, by "kind:id" → ready day.'},
|
demo:{type:'map',doc:'Vendor demo units on order, by "kind:id" → ready day.'},
|
||||||
seatOff:{type:'map',doc:'The pending consortium-cable seat offer: landings, km, name, expiry day.'},
|
seatOff:{type:'map',doc:'The pending consortium-cable seat offer: landings, km, name, expiry day.'},
|
||||||
monkey:{type:'map',doc:'The chaos monkey: next visit day, whether it is in your network now, days left, whether anyone noticed.'},
|
monkey:{type:'map',doc:'The chaos monkey: next visit day, whether it is in your network now, days left, whether anyone noticed.'},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ function apiValidate(spec,args){
|
||||||
// maps, and the paths a command declares in watch. R is left out: it is rebuilt after every action.
|
// maps, and the paths a command declares in watch. R is left out: it is rebuilt after every action.
|
||||||
const API_FP_LEN=['links','transit','pni','caches','biz','offers','nni','loans','loanOffers','inc','scrubs'];
|
const API_FP_LEN=['links','transit','pni','caches','biz','offers','nni','loans','loanOffers','inc','scrubs'];
|
||||||
const API_FP_KEYS=['pops','ixp','peers','myIx','done','ach','merged','confReg'];
|
const API_FP_KEYS=['pops','ixp','peers','myIx','done','ach','merged','confReg'];
|
||||||
const API_FP_JSON=['name','pairMet','rs','ixn','ixSite','ixPref','spares','te','cnLic','hw','scrubMode','ppol','ops','core','ddosAuto','popStd','demo','charter','monkey','seatOff','pz','ar','dk','ev'];
|
const API_FP_JSON=['name','pairMet','rs','ixn','ixSite','ixPref','spares','te','cnLic','hw','scrubMode','ppol','ops','core','ddosAuto','popStd','popTiers','demo','charter','monkey','seatOff','pz','ar','dk','ev'];
|
||||||
function apiFp(watch,args){
|
function apiFp(watch,args){
|
||||||
if(!S)return null;
|
if(!S)return null;
|
||||||
const f={cash:S.cash,day:S.day,lvl:S.lvl||1,won:!!S.won,lost:!!S.lost};
|
const f={cash:S.cash,day:S.day,lvl:S.lvl||1,won:!!S.won,lost:!!S.lost};
|
||||||
|
|
|
||||||
20
src/game/60-features/39-req-fix.js
Normal file
20
src/game/60-features/39-req-fix.js
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
/* ---------- Buy what a customer asks for, on signing (#241) ----------
|
||||||
|
Some requirements are hardware at a POP you already have: a backup generator, a second router, a second building.
|
||||||
|
An offer that asks for them gets a second button that buys exactly what is missing and signs, with the price on it.
|
||||||
|
Never silent: the player presses it, and nothing is bought unless the deal can be signed right after. */
|
||||||
|
const REQ_FIX=['gen','routers','metro'];
|
||||||
|
// What is missing for this offer, priced as the Infra tab's own buttons price it: [{k, city, cost, mo}], with totals.
|
||||||
|
function reqFix(o){if(!o||!bHas(o)||pzOn())return null;const items=[],cs=[o.city,o.city2].filter(Boolean);
|
||||||
|
for(const k of o.reqs||[]){if(!REQ_FIX.includes(k)||!REQS[k]||REQS[k].ok(o))continue;
|
||||||
|
for(const c of k==='routers'?[o.city]:cs){const p=S.pops[c];if(!p||items.some(x=>x.k===k&&x.city===c))continue;
|
||||||
|
if(k==='gen'&&!p.gen)items.push({k,city:c,cost:GEN_COST,mo:GEN_MO});
|
||||||
|
else if(k==='metro'&&!p.site2)items.push({k,city:c,cost:SITE2_COST,mo:SITE2_MO});
|
||||||
|
else if(k==='routers'&&(p.routers||1)<2){const g=p.rgen||0;items.push({k,city:c,cost:routerCost(g,p.routers||1),mo:routerMo(g)});}}}
|
||||||
|
if(!items.length)return null;return {items,cost:items.reduce((a,x)=>a+x.cost,0),mo:items.reduce((a,x)=>a+x.mo,0)};}
|
||||||
|
// Whether accept() would sign this offer now: the same checks, so money is never spent on a deal that then refuses.
|
||||||
|
const reqFixCanSign=o=>bHas(o)&&!(BIZ_T[o.type].event&&S.day>=o.start);
|
||||||
|
const REQ_FIX_L={gen:N_('req_fix.generator_in_city'),routers:N_('req_fix.second_router_in_city'),metro:N_('req_fix.second_site_in_city')};
|
||||||
|
// The button and one line saying what it buys. sm: the button size the list around it uses.
|
||||||
|
function reqFixHtml(o){const q=reqFix(o);if(!q||!reqFixCanSign(o))return '';
|
||||||
|
return `<div class="meta">${tr('req_fix.buys_list',{list:q.items.map(x=>tr(REQ_FIX_L[x.k],{city:CITY[x.city].name})).join(', '),cost:fmt$(q.cost),mo:fmt$(q.mo)})}</div>
|
||||||
|
<div class="btns">${btn(tr('req_fix.buy_and_sign',{cost:fmt$(q.cost)}),'acceptFix',{id:o.id,cost:q.cost},'pink sm',S.cash<q.cost)}</div>`;}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
function newGame(name,home){
|
function newGame(name,home){
|
||||||
S={v:1,name,asn:200000+Math.floor(_rand()*15000),home,day:0,cash:START_CASH,
|
S={v:1,name,asn:200000+Math.floor(_rand()*15000),home,day:0,cash:START_CASH,
|
||||||
ltv:2,t1v:4,auV:1,calV:1,pieV:1,pie:null,ops:opsNew(),slAuto:slAutoNew(),achP:{},seen:NETS.map(n=>n.id),spares:{},pops:{[home]:{day:0,bb:null,boost:0,down:0,routers:1,gen:false}},links:[],nni:[],transit:[],ixp:{},rs:{},peers:{},pni:[],caches:[],biz:[],offers:[],myIx:{},pairMet:{},
|
ltv:2,t1v:4,auV:1,calV:1,pieV:1,pie:null,ops:opsNew(),slAuto:slAutoNew(),achP:{},seen:NETS.map(n=>n.id),spares:{},pops:{[home]:{day:0,bb:null,boost:0,down:0,routers:1,gen:false}},links:[],nni:[],transit:[],ixp:{},rs:{},peers:{},pni:[],caches:[],biz:[],offers:[],myIx:{},pairMet:{},
|
||||||
done:{},inc:[],fleet:{},ev:{ddosMore:[]},ddosStarts:[],priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},vol:0,cnLic:{state:'none'},scrubs:[],scrubMode:'always',ddosAuto:{rtbh:false,scrub:true},capDeal:null,core:{lv:0,run:0},popStd:null,won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0,ppol:'open',pdesk:null,pdeskRep:null,hw:{},rules:makeRules('oncall'),charter:'global',cm:cmNew(),chartSet:false,demo:{},seatOff:null,solWon:0,monkey:{next:null,on:0}};
|
done:{},inc:[],fleet:{},ev:{ddosMore:[]},ddosStarts:[],priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},vol:0,cnLic:{state:'none'},scrubs:[],scrubMode:'always',ddosAuto:{rtbh:false,scrub:true},capDeal:null,core:{lv:0,run:0},popStd:null,popTiers:ptNew(),won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0,ppol:'open',pdesk:null,pdeskRep:null,hw:{},rules:makeRules('oncall'),charter:'global',cm:cmNew(),chartSet:false,demo:{},seatOff:null,solWon:0,monkey:{next:null,on:0}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,10 @@ const OPS=[
|
||||||
{k:'ix',i:'🔀',t:N_('ops.o_ix'),d:N_('ops.o_ix_d'),p:{}},
|
{k:'ix',i:'🔀',t:N_('ops.o_ix'),d:N_('ops.o_ix_d'),p:{}},
|
||||||
{k:'pni',i:'🤝',pop:1,cap:50000,t:N_('ops.o_pni'),d:N_('ops.o_pni_d'),p:{g:{d:25,v:[5,10,25,50,100],l:N_('ops.p_g'),f:v=>fmtG(v)},tier:{d:0,v:[0,1,2],l:N_('ops.p_tier'),f:v=>tr('ops.at_least_port',{port:PORT[v].n})},paid:{d:false,v:[false,true],l:N_('ops.p_paid'),f:v=>v?tr('common.on'):tr('common.off')}}},
|
{k:'pni',i:'🤝',pop:1,cap:50000,t:N_('ops.o_pni'),d:N_('ops.o_pni_d'),p:{g:{d:25,v:[5,10,25,50,100],l:N_('ops.p_g'),f:v=>fmtG(v)},tier:{d:0,v:[0,1,2],l:N_('ops.p_tier'),f:v=>tr('ops.at_least_port',{port:PORT[v].n})},paid:{d:false,v:[false,true],l:N_('ops.p_paid'),f:v=>v?tr('common.on'):tr('common.off')}}},
|
||||||
{k:'repair',i:'🔧',cap:50000,t:N_('ops.o_repair'),d:N_('ops.o_repair_d'),p:{}},
|
{k:'repair',i:'🔧',cap:50000,t:N_('ops.o_repair'),d:N_('ops.o_repair_d'),p:{}},
|
||||||
{k:'optics',i:'🌈',cap:250000,t:N_('ops.o_optics'),d:N_('ops.o_optics_d'),p:{at:{d:70,v:[50,60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'},pick:{d:'cheap',v:['cheap','big'],l:N_('ops.p_pick'),f:v=>tr({cheap:N_('ops.pick_cheap'),big:N_('ops.pick_big')}[v])}}},
|
{k:'optics',i:'🌈',cap:250000,t:N_('ops.o_optics'),d:N_('ops.o_optics_d'),p:{at:{d:70,v:[50,60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'},pick:{d:'cheap',v:['cheap','big'],l:N_('ops.p_pick'),f:v=>tr({cheap:N_('ops.pick_cheap'),big:N_('ops.pick_big')}[v])},
|
||||||
|
// New fiber pulls traffic onto itself the day it is lit (#316): the player may want to light it by hand, when the
|
||||||
|
// ports behind it are ready. Off: fiber without a channel stays dark; lit fiber still gets more optics when hot.
|
||||||
|
fresh:{d:true,v:[true,false],l:N_('ops.p_fresh'),f:v=>v?tr('common.on'):tr('common.off')}}},
|
||||||
// Line systems up to a bigger one, and optics swapped for bigger ones, on fiber that is full and runs hot, or every fiber up to
|
// Line systems up to a bigger one, and optics swapped for bigger ones, on fiber that is full and runs hot, or every fiber up to
|
||||||
// a chosen line system. A line system swap is a day without that fiber: only where the traffic gets around it.
|
// a chosen line system. A line system swap is a day without that fiber: only where the traffic gets around it.
|
||||||
{k:'optup',i:'🔭',cap:250000,t:N_('ops.o_optup'),d:N_('ops.o_optup_d'),p:{at:{d:80,v:[60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'},
|
{k:'optup',i:'🔭',cap:250000,t:N_('ops.o_optup'),d:N_('ops.o_optup_d'),p:{at:{d:80,v:[60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'},
|
||||||
|
|
@ -208,8 +211,8 @@ const OPS_RUN={
|
||||||
const lag=o.lag(),wantLag=o.n()<2&&o.rt>1,ups=wantLag&&lag?null:o.ups(),fit=ups&&(ups.find(u=>u.cap>=N*o.use)||ups.at(-1)),job=wantLag?lag||fit:fit||lag,was=o.sig();
|
const lag=o.lag(),wantLag=o.n()<2&&o.rt>1,ups=wantLag&&lag?null:o.ups(),fit=ups&&(ups.find(u=>u.cap>=N*o.use)||ups.at(-1)),job=wantLag?lag||fit:fit||lag,was=o.sig();
|
||||||
if(!job||!X.can('ports',job.cost)||!X.pay('ports',()=>{job.go();return o.sig()!==was;})){KV.rv=null;KV.pu.clear();break;}
|
if(!job||!X.can('ports',job.cost)||!X.pay('ports',()=>{job.go();return o.sig()!==was;})){KV.rv=null;KV.pu.clear();break;}
|
||||||
KV.rv=null;KV.pu.clear();X.did('ports',o.at+' '+job.w);yield;}},
|
KV.rv=null;KV.pu.clear();X.did('ports',o.at+' '+job.w);yield;}},
|
||||||
*optics(X){const at=opsP('optics','at')/100,big=opsP('optics','pick')==='big',gpd=(o,l)=>optG(o,l)/optCost(o);
|
*optics(X){const at=opsP('optics','at')/100,big=opsP('optics','pick')==='big',fresh=opsP('optics','fresh'),gpd=(o,l)=>optG(o,l)/optCost(o);
|
||||||
for(const l of S.links){if(l.kind!=='df'||l.ready>S.day||l.eqDown>S.day||l.standby||l.cut>S.day)continue;
|
for(const l of S.links){if(l.kind!=='df'||l.ready>S.day||l.eqDown>S.day||l.standby||l.cut>S.day||(!fresh&&!(l.ch||[]).length))continue;
|
||||||
let cap=dfCap(l);const load=((R.load&&R.load[l.id])||0)*opsAhead();
|
let cap=dfCap(l);const load=((R.load&&R.load[l.id])||0)*opsAhead();
|
||||||
// New fiber gets its first channel; lit fiber gets more while it runs hot.
|
// New fiber gets its first channel; lit fiber gets more while it runs hot.
|
||||||
for(let step=0;step<8&&(cap<=0?!(l.ch||[]).length:load>=cap*at);step++){if(chMax(l)-(l.ch||[]).length-soldSlots(l)<=0)break;
|
for(let step=0;step<8&&(cap<=0?!(l.ch||[]).length:load>=cap*at);step++){if(chMax(l)-(l.ch||[]).length-soldSlots(l)<=0)break;
|
||||||
|
|
|
||||||
49
src/game/60-features/96-pop-tiers.js
Normal file
49
src/game/60-features/96-pop-tiers.js
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
/* ---------- POP standards: micro, medium, regional hub (#315) ----------
|
||||||
|
Real networks build a few kinds of POP, not one: a small edge site, a medium one, a regional hub. The player saves a
|
||||||
|
POP's routers as one of three standards and marks POPs as that kind; a POP is brought up to its standard with one
|
||||||
|
button, and every POP of a kind with one more once the standard grows (a new model unlocked, more routers). Which POP
|
||||||
|
is which stays the player's choice, so growth stays selective. Never a step down: a POP with a bigger model keeps it.
|
||||||
|
The standard for brand-new POPs (#240, 96-pop-standard.js) is a separate thing. From customer level 2, like the intern. */
|
||||||
|
const POP_TIERS=['micro','medium','hub'];
|
||||||
|
const POP_TIER_L={micro:N_('pop_tiers.micro'),medium:N_('pop_tiers.medium'),hub:N_('pop_tiers.hub')};
|
||||||
|
const ptNew=()=>({def:{micro:null,medium:null,hub:null},at:{}});
|
||||||
|
const ptOn=()=>!!S&&opsCanHire()&&!pzOn();
|
||||||
|
const ptO=()=>S.popTiers||(S.popTiers=ptNew());
|
||||||
|
// Saves are untrusted: known kinds, router models that exist, POPs that still exist.
|
||||||
|
function ptSanitize(s){const o=s.popTiers&&typeof s.popTiers==='object'&&!Array.isArray(s.popTiers)?s.popTiers:{},n=ptNew(),d=o.def&&typeof o.def==='object'?o.def:{},at=o.at&&typeof o.at==='object'&&!Array.isArray(o.at)?o.at:{};
|
||||||
|
for(const k of POP_TIERS){const x=d[k];if(x&&typeof x==='object'&&Number.isInteger(x.g)&&RG[x.g])n.def[k]={g:x.g,rt:int(x.rt,1,RMAX,1)};}
|
||||||
|
for(const c of Object.keys(at))if(isCity(c)&&own(s.pops,c)&&POP_TIERS.includes(at[c]))n.at[c]=at[c];
|
||||||
|
s.popTiers=n;}
|
||||||
|
// The clicks that bring a POP up to a standard, in order, priced as each click prices it: a second router first where a
|
||||||
|
// lone router carries traffic (so the swap is a rolling upgrade, not a maintenance window), the bigger model, the rest of
|
||||||
|
// the routers. null when the POP already meets it. why: what stops it today.
|
||||||
|
function ptPlan(c,k){const p=S.pops[c],d=S.popTiers&&S.popTiers.def[k];if(!p||!d)return null;
|
||||||
|
const g0=p.rgen||0,rt0=p.routers||1,up=d.g!==g0&&RG[d.g].cap>RG[g0].cap,steps=[];let rt=rt0,cost=0;
|
||||||
|
if(up&&rt===1&&d.rt>=2&&!popIdle(c)){cost+=routerCost(g0,1);steps.push('add');rt=2;}
|
||||||
|
if(up){cost+=Math.max(0,Math.round(RG[d.g].cost*rt*hwMul('rt')*techMul(RG[d.g].lvl))-tradeIn(g0,rt));steps.push('swap');}
|
||||||
|
const g=up?d.g:g0;while(rt<d.rt){cost+=routerCost(g,rt);steps.push('add');rt++;}
|
||||||
|
if(!steps.length)return null;
|
||||||
|
const mo=n=>(n-1)*ROUTER_MO+cageMo(n),why=up?(!techOk('rg',d.g,RG[d.g].lvl)?tr('pop_tiers.model_locked',{model:esc(RG[d.g].n),lv:RG[d.g].lvl}):modelFits(c,d.g)||(p.rupDay===S.day?tr('pop_tiers.swapped_today'):'')):'';
|
||||||
|
return {steps,cost,g:d.g,mo:mo(rt)+rt*RG[g].mo-mo(rt0)-rt0*RG[g0].mo,why};}
|
||||||
|
// Run the plan through the Infra tab's own actions, quietly. True when every click went through.
|
||||||
|
function ptRun(c,q){let ok=true;opsQuiet(()=>{for(const s of q.steps){const p=S.pops[c],rt=p.routers||1,g=p.rgen||0;
|
||||||
|
if(s==='add')ACT.addRouter({city:c});else ACT.upRouter({city:c,g:q.g});if((p.routers||1)===rt&&(p.rgen||0)===g){ok=false;break;}}});return ok;}
|
||||||
|
// The POPs of one kind, the busiest first, with their plans.
|
||||||
|
function ptAll(k){const at=S.popTiers?S.popTiers.at:{},cs=Object.keys(at).filter(c=>at[c]===k&&S.pops[c]).sort((a,b)=>(R.nodeLoad[b]||0)-(R.nodeLoad[a]||0)||a.localeCompare(b));
|
||||||
|
const todo=[],stuck=[];for(const c of cs){const q=ptPlan(c,k);if(!q)continue;(q.why?stuck:todo).push({c,q});}
|
||||||
|
return {cs,todo,stuck,cost:todo.reduce((a,x)=>a+x.q.cost,0)};}
|
||||||
|
const ptName=k=>tr(POP_TIER_L[k]),ptDesc=d=>d?`${d.rt} × ${esc(RG[d.g].n)}`:tr('pop_tiers.not_set');
|
||||||
|
// In a POP's router section: the three standards, what this POP is, and one button each.
|
||||||
|
function popTierHtml(c){if(!ptOn()||!S.pops[c])return '';const T=ptO(),p=S.pops[c],mine=T.at[c];
|
||||||
|
return `<div class="ptier"><div class="kv"><span>${tr('pop_tiers.title')}</span><b>${mine?tr('pop_tiers.this_pop_is',{kind:ptName(mine)}):tr('pop_tiers.no_kind')}</b></div>
|
||||||
|
${POP_TIERS.map(k=>{const d=T.def[k],q=d?ptPlan(c,k):null,same=d&&d.g===(p.rgen||0)&&d.rt===(p.routers||1);
|
||||||
|
const main=!d?'':q?btn(tr('pop_tiers.apply_cost',{cost:fmt$(q.cost)}),'ptApply',{city:c,k,cost:q.cost},mine===k?'pink sm':'sm',!!q.why||S.cash<q.cost):mine!==k?btn(tr('pop_tiers.mark'),'ptApply',{city:c,k,cost:0},'sm'):`<span class="tag st on">✓ ${tr('pop_tiers.meets_it')}</span>`;
|
||||||
|
return `<div class="row"><div class="grow"><div class="nm">${ptName(k)} <span class="meta">${ptDesc(d)}</span></div>${q&&q.why?`<div class="why">${esc(q.why)}</div>`:''}
|
||||||
|
<div class="btns">${main}${same?'':btn(tr('pop_tiers.save_here'),'ptSave',{city:c,k},'ghost sm')}</div></div></div>`;}).join('')}
|
||||||
|
<p class="note">${tr('pop_tiers.note')}</p></div>`;}
|
||||||
|
// In Utilities: every kind with its POPs, and one button that brings them all up to their standard.
|
||||||
|
function popTierAllHtml(city){if(!ptOn())return '';const T=ptO();if(!POP_TIERS.some(k=>T.def[k]))return '';
|
||||||
|
return `<section><h3>${tr('pop_tiers.title')}</h3><p class="lead">${tr('pop_tiers.bulk_note')}</p>
|
||||||
|
${POP_TIERS.filter(k=>T.def[k]).map(k=>{const A=ptAll(k);return `<div class="row"><div class="grow"><div class="nm">${ptName(k)} <span class="meta">${ptDesc(T.def[k])}</span></div>
|
||||||
|
<div class="meta">${trn('pop_tiers.n_pops',A.cs.length)}${A.todo.length?' · '+trn('pop_tiers.n_below',A.todo.length):''}${A.stuck.length?' · '+trn('pop_tiers.n_stuck',A.stuck.length):''}</div>
|
||||||
|
${A.todo.length?`<div class="btns">${btn(trn('pop_tiers.bring_up_n',A.todo.length,{cost:fmt$(A.cost)}),'ptAll',{k,cost:A.cost,city},'pink sm',S.cash<A.cost)}</div>`:''}</div></div>`;}).join('')}</section>`;}
|
||||||
|
|
@ -40,6 +40,12 @@ function utilityKit(city){const p=S&&S.pops[city];if(!p)return null;
|
||||||
const gen=!p.gen,site=!p.site2,router=(p.routers||1)<2,g=p.rgen||0;
|
const gen=!p.gen,site=!p.site2,router=(p.routers||1)<2,g=p.rgen||0;
|
||||||
return {gen,site,router,moves:utilityCacheMoves(city),cost:(gen?GEN_COST:0)+(site?SITE2_COST:0)+(router?routerCost(g,1):0),
|
return {gen,site,router,moves:utilityCacheMoves(city),cost:(gen?GEN_COST:0)+(site?SITE2_COST:0)+(router?routerCost(g,1):0),
|
||||||
mo:(gen?GEN_MO:0)+(site?SITE2_MO:0)+(router?routerMo(g):0)};}
|
mo:(gen?GEN_MO:0)+(site?SITE2_MO:0)+(router?routerMo(g):0)};}
|
||||||
|
// The kit at every POP that lacks part of it (#317): one quote, one button. From customer level 2, like the intern: early
|
||||||
|
// on, every generator is a choice about money.
|
||||||
|
const utilityKitAllOn=()=>!!S&&opsCanHire()&&!pzOn();
|
||||||
|
function utilityKitAll(){if(!utilityKitAllOn())return null;const cities=[];let cost=0,mo=0,moves=0;
|
||||||
|
for(const c of Object.keys(S.pops)){const q=utilityKit(c);if(!q||(!q.cost&&!q.moves.length))continue;cities.push(c);cost+=q.cost;mo+=q.mo;moves+=q.moves.length;}
|
||||||
|
return {cities,cost,mo,moves};}
|
||||||
function utilityPeers(){if(!S)return [];return Object.keys(S.ixp).filter(isIx).map(ix=>{
|
function utilityPeers(){if(!S)return [];return Object.keys(S.ixp).filter(isIx).map(ix=>{
|
||||||
const sessions=ixSessions(ix),requests=[],blocked=[];let existing=0;
|
const sessions=ixSessions(ix),requests=[],blocked=[];let existing=0;
|
||||||
for(const id of ixMembers(ix)){
|
for(const id of ixMembers(ix)){
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,8 @@ function sanitize(s){
|
||||||
// The backbone's technology: a save from before it with Auto-TE bought keeps the old rules on RSVP-TE (legacy).
|
// The backbone's technology: a save from before it with Auto-TE bought keeps the old rules on RSVP-TE (legacy).
|
||||||
// The standard POP build (#240): a router model and how many.
|
// The standard POP build (#240): a router model and how many.
|
||||||
{const d=s.popStd;s.popStd=d&&typeof d==='object'&&Number.isInteger(d.g)&&RG[d.g]?{g:d.g,rt:int(d.rt,1,RMAX,1)}:null;}
|
{const d=s.popStd;s.popStd=d&&typeof d==='object'&&Number.isInteger(d.g)&&RG[d.g]?{g:d.g,rt:int(d.rt,1,RMAX,1)}:null;}
|
||||||
|
// POP standards by kind (#315): micro, medium, regional hub, and which POP is which.
|
||||||
|
ptSanitize(s);
|
||||||
{const c=s.core&&typeof s.core==='object'?s.core:null,lv=c?int(c.lv,0,4,0):(s.te?2:0);s.core={lv,run:c?int(c.run,0,lv,lv):lv};if(c?c.legacy===true:!!s.te)s.core.legacy=true;if(c&&c.lab===true)s.core.lab=true;if(c&&c.since!==undefined)s.core.since=num(c.since,0);}
|
{const c=s.core&&typeof s.core==='object'?s.core:null,lv=c?int(c.lv,0,4,0):(s.te?2:0);s.core={lv,run:c?int(c.run,0,lv,lv):lv};if(c?c.legacy===true:!!s.te)s.core.legacy=true;if(c&&c.lab===true)s.core.lab=true;if(c&&c.since!==undefined)s.core.since=num(c.since,0);}
|
||||||
s.capDeal=s.capDeal&&typeof s.capDeal==='object'&&own(CAP_ROUTES,s.capDeal.c)?{at:num(s.capDeal.at,0),c:s.capDeal.c}:null;
|
s.capDeal=s.capDeal&&typeof s.capDeal==='object'&&own(CAP_ROUTES,s.capDeal.c)?{at:num(s.capDeal.at,0),c:s.capDeal.c}:null;
|
||||||
s.inc=s.inc.filter(i=>i&&typeof i.type==='string').map(i=>(i.type==='maxpfx'&&(i.type='ixloop'),i.id=sid(i.id),i.until=num(i.until,s.day),i.cost=num(i.cost,0),i.msg=String(i.msg||'').slice(0,400),i.fix=i.fix==null?undefined:String(i.fix).slice(0,60),i));
|
s.inc=s.inc.filter(i=>i&&typeof i.type==='string').map(i=>(i.type==='maxpfx'&&(i.type='ixloop'),i.id=sid(i.id),i.until=num(i.until,s.day),i.cost=num(i.cost,0),i.msg=String(i.msg||'').slice(0,400),i.fix=i.fix==null?undefined:String(i.fix).slice(0,60),i));
|
||||||
|
|
|
||||||
6
src/game/90-actions/46-net-filter.js
Normal file
6
src/game/90-actions/46-net-filter.js
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
// Find a network at a POP (#199): view state only.
|
||||||
|
Object.assign(ACT,{
|
||||||
|
netFind:({q})=>{UI.netQ=String(q??'').slice(0,40);listReset('pni');renderPanel();},
|
||||||
|
netOnly:()=>{UI.netOnly=!UI.netOnly;listReset('pni');renderPanel();},
|
||||||
|
netClear:()=>{UI.netQ='';UI.netOnly=false;listReset('pni');renderPanel();},
|
||||||
|
});
|
||||||
10
src/game/90-actions/51-customer-fix.js
Normal file
10
src/game/90-actions/51-customer-fix.js
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
Object.assign(ACT,{
|
||||||
|
// Buy what the offer asks for, then sign (#241). cost: the price the button showed; a changed quote buys nothing.
|
||||||
|
acceptFix:({id,cost})=>{const o=S.offers.find(x=>x.id===id),q=reqFix(o);if(!o||!q||!reqFixCanSign(o))return;
|
||||||
|
if(q.cost!==+cost){toast(tr('utilities.quote_changed'),'bad');sfx('err');after();return;}
|
||||||
|
if(S.cash<q.cost){toast(tr('interface.not_enough_cash_wait_for_revenue'),'bad');sfx('err');return;}
|
||||||
|
// The Infra tab's own buttons, quietly, then the ordinary signing with its toast and redraw.
|
||||||
|
opsQuiet(()=>{for(const x of q.items){if(x.k==='gen')ACT.addGen({city:x.city});else if(x.k==='metro')ACT.addSite({city:x.city});else ACT.addRouter({city:x.city});}});
|
||||||
|
toast(esc(tr('req_fix.bought',{list:q.items.map(x=>tr(REQ_FIX_L[x.k],{city:CITY[x.city].name})).join(', '),cost:fmt$(q.cost)})),'good');
|
||||||
|
ACT.accept({id});},
|
||||||
|
});
|
||||||
|
|
@ -4,7 +4,10 @@ Object.assign(ACT,{
|
||||||
decomToggle:({city})=>{if(!S.pops[city])return;UI.decom=UI.decom||new Set();if(UI.decom.has(city))UI.decom.delete(city);else UI.decom.add(city);decomModal();},
|
decomToggle:({city})=>{if(!S.pops[city])return;UI.decom=UI.decom||new Set();if(UI.decom.has(city))UI.decom.delete(city);else UI.decom.add(city);decomModal();},
|
||||||
decomGo:()=>{const sel=[...(UI.decom||[])].filter(c=>S.pops[c]);if(!sel.length||sel.length>=Object.keys(S.pops).length)return;closeModal();UI.decom=null;UI.sel=null;decommission(sel);sfx('alert');after();},
|
decomGo:()=>{const sel=[...(UI.decom||[])].filter(c=>S.pops[c]);if(!sel.length||sel.length>=Object.keys(S.pops).length)return;closeModal();UI.decom=null;UI.sel=null;decommission(sel);sfx('alert');after();},
|
||||||
rmLink:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}{const l=S.links.find(x=>x.id===id),back=cabBack(l);if(back>0){S.cash+=back;toast(tr('links.name_is_called_off_the_cable',{name:esc(l.cname||tr('common.your_cable')),price:fmt$(back)}),'good');}
|
rmLink:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}{const l=S.links.find(x=>x.id===id),back=cabBack(l);if(back>0){S.cash+=back;toast(tr('links.name_is_called_off_the_cable',{name:esc(l.cname||tr('common.your_cable')),price:fmt$(back)}),'good');}
|
||||||
const n=chBack(l?[l]:[]);if(n)toast(trn('links.n_optic_back_on_the_spares_shelf',n),'good');}S.links=S.links.filter(l=>l.id!==id);prunePairMet();UI.sel=null;UI.confirm=null;after();},
|
const n=chBack(l?[l]:[]);if(n)toast(trn('links.n_optic_back_on_the_spares_shelf',n),'good');}const l0=S.links.find(x=>x.id===id),sib=l0?pairLinks(l0.a,l0.b).filter(x=>x!==l0&&x.kind!=='vxc'):[];S.links=S.links.filter(l=>l.id!==id);prunePairMet();
|
||||||
|
// One of several parallel links (#119): the panel moves on to the next one between the same cities, so a row of them
|
||||||
|
// can be handed back without opening the panel again each time.
|
||||||
|
UI.sel=sib.length?{type:'link',id:sib[0].id}:null;UI.confirm=null;after();},
|
||||||
// The chaos monkey takes a banana and goes home early (no bonus).
|
// The chaos monkey takes a banana and goes home early (no bonus).
|
||||||
mkBanana:()=>{if(!mkOn())return;if(!spend(mkBananaCost()))return;S.stats.bananas=(S.stats.bananas||0)+1;mkLeave('banana');track('monkey_banana');after();},
|
mkBanana:()=>{if(!mkOn())return;if(!spend(mkBananaCost()))return;S.stats.bananas=(S.stats.bananas||0)+1;mkLeave('banana');track('monkey_banana');after();},
|
||||||
fixInc:({id})=>{const i=S.inc.find(x=>x.id===id);if(!i||!(i.cost>0))return;
|
fixInc:({id})=>{const i=S.inc.find(x=>x.id===id);if(!i||!(i.cost>0))return;
|
||||||
|
|
|
||||||
16
src/game/90-actions/85-pop-tiers.js
Normal file
16
src/game/90-actions/85-pop-tiers.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
// POP standards (#315): save one, bring a POP up to one, bring every POP of a kind up to it.
|
||||||
|
Object.assign(ACT,{
|
||||||
|
ptSave:({city,k})=>{const p=S.pops[city];if(!ptOn()||!p||!POP_TIERS.includes(k))return;const T=ptO();T.def[k]={g:p.rgen||0,rt:p.routers||1};T.at[city]=k;
|
||||||
|
toast(esc(tr('pop_tiers.saved',{kind:ptName(k),desc:`${T.def[k].rt} × ${RG[T.def[k].g].n}`})),'good');sfx('click');after();},
|
||||||
|
// cost: the price on the button; a plan that changed under it buys nothing. A POP that already meets it is only marked.
|
||||||
|
ptApply:({city,k,cost})=>{if(!ptOn()||!S.pops[city]||!POP_TIERS.includes(k)||!ptO().def[k])return;const q=ptPlan(city,k);
|
||||||
|
if((q?q.cost:0)!==+cost){toast(tr('utilities.quote_changed'),'bad');sfx('err');after();return;}
|
||||||
|
if(q&&q.why){toast(esc(q.why),'bad');sfx('err');return;}if(q&&S.cash<q.cost){toast(tr('interface.not_enough_cash_wait_for_revenue'),'bad');sfx('err');return;}
|
||||||
|
S.popTiers.at[city]=k;const ok=!q||ptRun(city,q);
|
||||||
|
toast(esc(ok?tr('pop_tiers.city_is_kind',{city:CITY[city].name,kind:ptName(k)}):tr('pop_tiers.not_all',{city:CITY[city].name})),ok?'good':'bad');sfx(q?'build':'click');after();},
|
||||||
|
ptAll:({k,cost,city})=>{if(!ptOn()||!POP_TIERS.includes(k))return;const A=ptAll(k);if(!A.todo.length)return;
|
||||||
|
if(A.cost!==+cost){utilitiesModal(city,tr('utilities.quote_changed'));return;}
|
||||||
|
if(S.cash<A.cost){toast(tr('interface.not_enough_cash_wait_for_revenue'),'bad');sfx('err');return;}
|
||||||
|
let n=0;for(const {c,q} of A.todo)if(ptRun(c,q))n++;
|
||||||
|
sfx('build');after();utilitiesModal(city,trn('pop_tiers.bulk_done',n,{kind:ptName(k)}));},
|
||||||
|
});
|
||||||
|
|
@ -10,6 +10,14 @@ Object.assign(ACT,{
|
||||||
if(q.gen)p.gen=true;if(q.site){p.site2=true;p.site2Day=S.day;}if(q.router)p.routers=2;
|
if(q.gen)p.gen=true;if(q.site){p.site2=true;p.site2Day=S.day;}if(q.router)p.routers=2;
|
||||||
const moves=new Map(q.moves.map(m=>[m.id,m.site]));for(const c of S.caches)if(moves.has(c.id))c.site=moves.get(c.id);
|
const moves=new Map(q.moves.map(m=>[m.id,m.site]));for(const c of S.caches)if(moves.has(c.id))c.site=moves.get(c.id);
|
||||||
after();const msg=tr('utilities.kit_applied',{city:CITY[city].name});if(modal)utilitiesModal(city,msg);else toast(esc(msg),'good');},
|
after();const msg=tr('utilities.kit_applied',{city:CITY[city].name});if(modal)utilitiesModal(city,msg);else toast(esc(msg),'good');},
|
||||||
|
// Every POP's kit in one go (#317), all or nothing on the quoted price, one redraw at the end.
|
||||||
|
utilityKitAll:({cost,city})=>{const q=utilityKitAll();if(!q||!q.cities.length)return;
|
||||||
|
if(q.cost!==+cost){utilitiesModal(city,tr('utilities.quote_changed'));return;}
|
||||||
|
if(S.cash<q.cost){toast(tr('interface.not_enough_cash_wait_for_revenue'),'bad');sfx('err');return;}
|
||||||
|
let n=0;opsQuiet(()=>{for(const c of q.cities){const k=utilityKit(c);if(!k||S.cash<k.cost)continue;const c0=S.cash;ACT.utilityKit({city:c,cost:k.cost});if(S.cash<c0||!k.cost)n++;}});
|
||||||
|
sfx('build');after();utilitiesModal(city,trn('utilities.kit_all_applied',n));},
|
||||||
|
// The intern's new-POP template with or without the kit, from the Utilities sheet: the same switch as in Ops.
|
||||||
|
utilityKitNew:({city})=>{if(!opsHired())return;S.ops.tpl.kit=!S.ops.tpl.kit;sfx('click');after();utilitiesModal(city);},
|
||||||
utilityCaches:({city,quote,modal})=>{const q=utilityCaches(city);if(!q||!q.add.length)return;
|
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(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;
|
if(!portGate(city,q.ports))return;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ function renderLeft(){checkLayer();
|
||||||
{const lv=S.lvl||1,nx=LEVELS[lv];h+=`<div class="inc" style="background:#FFF6CF"><div class="nm">${tr('hud_and_panels.customer_level_lv_name',{lv,name:LEVELS[lv-1].n})}</div><div class="meta">${nx?tr('hud_and_panels.next_req_unlocks_what',{req:nx.req,what:lc1(nx.unlock)}):tr('common.every_customer_type_is_unlocked_go')}</div></div>`;}
|
{const lv=S.lvl||1,nx=LEVELS[lv];h+=`<div class="inc" style="background:#FFF6CF"><div class="nm">${tr('hud_and_panels.customer_level_lv_name',{lv,name:LEVELS[lv-1].n})}</div><div class="meta">${nx?tr('hud_and_panels.next_req_unlocks_what',{req:nx.req,what:lc1(nx.unlock)}):tr('common.every_customer_type_is_unlocked_go')}</div></div>`;}
|
||||||
if(!S.offers.length)h+=`<p class="empty">${tr('hud_and_panels.no_open_offers_right_now_businesses')}</p>`;
|
if(!S.offers.length)h+=`<p class="empty">${tr('hud_and_panels.no_open_offers_right_now_businesses')}</p>`;
|
||||||
for(const o of S.offers.slice().sort((a,b)=>a.exp-b.exp)){const has=bHas(o);
|
for(const o of S.offers.slice().sort((a,b)=>a.exp-b.exp)){const has=bHas(o);
|
||||||
h+=`<div class="row"><div class="grow"><div class="nm">${esc(o.name)}</div><div class="meta">${esc(BIZ_T[o.type].l)} · ${CITY[o.city].name}${o.city2?' ⇄ '+CITY[o.city2].name:''} · <b>${bTerms(o)}</b> · ${tr('ui.n_d_left',{n:o.exp-S.day})}${(o.reqs||[]).length?` · ${trn('hud_and_panels.n_special_requirement',o.reqs.length)}`:''}</div>${o.refN?`<div class="meta">${tr('lifecycle.referred_by',{name:esc(o.refN)})}</div>`:''}${spotWhy(o)}${bRisk(o)}${reqList(o)}
|
h+=`<div class="row"><div class="grow"><div class="nm">${esc(o.name)}</div><div class="meta">${esc(BIZ_T[o.type].l)} · ${CITY[o.city].name}${o.city2?' ⇄ '+CITY[o.city2].name:''} · <b>${bTerms(o)}</b> · ${tr('ui.n_d_left',{n:o.exp-S.day})}${(o.reqs||[]).length?` · ${trn('hud_and_panels.n_special_requirement',o.reqs.length)}`:''}</div>${o.refN?`<div class="meta">${tr('lifecycle.referred_by',{name:esc(o.refN)})}</div>`:''}${spotWhy(o)}${bRisk(o)}${reqList(o)}${reqFixHtml(o)}
|
||||||
<div class="btns">${has?btn(tr('common.accept'),'accept',{id:o.id},'green sm'):btn(tr('common.go_there'),'focusCity',{city:bCities(o).find(c=>!S.pops[c])},'ghost sm')}${btn(tr('common.decline'),'decline',{id:o.id},'ghost sm')}</div>${has?'':`<div class="why">${tr('hud_and_panels.needs_a_pop_in_cities',{cities:bCities(o).filter(x=>!S.pops[x]).map(x=>CITY[x].name).join(', ')})}</div>`}</div></div>`;}
|
<div class="btns">${has?btn(tr('common.accept'),'accept',{id:o.id},'green sm'):btn(tr('common.go_there'),'focusCity',{city:bCities(o).find(c=>!S.pops[c])},'ghost sm')}${btn(tr('common.decline'),'decline',{id:o.id},'ghost sm')}</div>${has?'':`<div class="why">${tr('hud_and_panels.needs_a_pop_in_cities',{cities:bCities(o).filter(x=>!S.pops[x]).map(x=>CITY[x].name).join(', ')})}</div>`}</div></div>`;}
|
||||||
}else if(UI.left==='noc'){
|
}else if(UI.left==='noc'){
|
||||||
h+=`<div class="btns" style="margin-bottom:8px">${btn(tr('hud_and_panels.open_noc_dashboard'),'dash',{},'pink')}${pieNocBtn()}${btn(`⚙️ ${tr('routing.routing_and_ddos')}${S.te&&!coreTE()?'<span class="cnt red dot" aria-hidden="true"></span>':''}`,'routingOpen',{},'')}</div>`;
|
h+=`<div class="btns" style="margin-bottom:8px">${btn(tr('hud_and_panels.open_noc_dashboard'),'dash',{},'pink')}${pieNocBtn()}${btn(`⚙️ ${tr('routing.routing_and_ddos')}${S.te&&!coreTE()?'<span class="cnt red dot" aria-hidden="true"></span>':''}`,'routingOpen',{},'')}</div>`;
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,10 @@ function cityPanel(c){
|
||||||
for(const b of bz)h+=`<div class="row"><div class="grow"><div class="nm">${esc(b.name)}</div><div class="meta">${esc(BIZ_T[b.type].l)}${b.city2?` ${CITY[b.city].name} ⇄ ${CITY[b.city2].name}`:''} · ${bTerms(b)}${clTermTxt(b)?' · '+clTermTxt(b):''}${BIZ_T[b.type].l2?` · ${b.sites?tr('city_panel.carrying_g_per_site',{g:fmtG(R.l2[b.id]||0)}):tr('city_panel.carrying_g',{g:fmtG(R.l2[b.id]||0)})}`:''}${BIZ_T[b.type].fiber&&!fiberOk(b)?' · <b style="color:var(--bad)">'+tr('city_panel.fiber_is_down')+'</b>':''}${BIZ_T[b.type].event&&eventLive(b)?` · <b>${tr('city_panel.serving_v',{v:pct(sfOf(R,b.city))})}</b>`:''}${b.type==='scrub'&&!hasScrub()?' · <b style="color:var(--bad)">'+tr('common.needs_a_scrubbing_center')+'</b>':''}${S.day-(b.since||0)<15?` · <b>${tr('common.provisioning_n_d_grace',{n:15-(S.day-(b.since||0))})}</b>`:''}</div>${bRisk(b)}${reqList(b)}${BIZ_T[b.type].l2?routeCtl(b):''}${pathCtl(b)}<div class="bar ${b.mood<30?'bad':b.mood<65?'warn':''}"><i style="width:${b.mood}%"></i></div><div class="meta">${tr('common.happiness_p',{p:Math.round(b.mood)})}</div></div>${btn(UI.confirm===b.id?tr('common.really_drop'):tr('common.drop'),'dropBiz',{id:b.id},'ghost sm')}</div>`;
|
for(const b of bz)h+=`<div class="row"><div class="grow"><div class="nm">${esc(b.name)}</div><div class="meta">${esc(BIZ_T[b.type].l)}${b.city2?` ${CITY[b.city].name} ⇄ ${CITY[b.city2].name}`:''} · ${bTerms(b)}${clTermTxt(b)?' · '+clTermTxt(b):''}${BIZ_T[b.type].l2?` · ${b.sites?tr('city_panel.carrying_g_per_site',{g:fmtG(R.l2[b.id]||0)}):tr('city_panel.carrying_g',{g:fmtG(R.l2[b.id]||0)})}`:''}${BIZ_T[b.type].fiber&&!fiberOk(b)?' · <b style="color:var(--bad)">'+tr('city_panel.fiber_is_down')+'</b>':''}${BIZ_T[b.type].event&&eventLive(b)?` · <b>${tr('city_panel.serving_v',{v:pct(sfOf(R,b.city))})}</b>`:''}${b.type==='scrub'&&!hasScrub()?' · <b style="color:var(--bad)">'+tr('common.needs_a_scrubbing_center')+'</b>':''}${S.day-(b.since||0)<15?` · <b>${tr('common.provisioning_n_d_grace',{n:15-(S.day-(b.since||0))})}</b>`:''}</div>${bRisk(b)}${reqList(b)}${BIZ_T[b.type].l2?routeCtl(b):''}${pathCtl(b)}<div class="bar ${b.mood<30?'bad':b.mood<65?'warn':''}"><i style="width:${b.mood}%"></i></div><div class="meta">${tr('common.happiness_p',{p:Math.round(b.mood)})}</div></div>${btn(UI.confirm===b.id?tr('common.really_drop'):tr('common.drop'),'dropBiz',{id:b.id},'ghost sm')}</div>`;
|
||||||
h+=`</section>`+offersHere(c);
|
h+=`</section>`+offersHere(c);
|
||||||
}else if(UI.tab==='up'){
|
}else if(UI.tab==='up'){
|
||||||
h+=portNote(c)+latNote(c);
|
h+=netFilterHtml()+portNote(c)+latNote(c);
|
||||||
h+=`<section><h3>${tr('common.ip_transit')}</h3><p class="lead">${tr('city_panel.pay_a_bigger_network_per_gbps')}</p>`;
|
h+=`<section><h3>${tr('common.ip_transit')}</h3><p class="lead">${tr('city_panel.pay_a_bigger_network_per_gbps')}</p>`;
|
||||||
const prov=NETS.filter(n=>sellsAt(n,c)).sort((a,b)=>a.price-b.price);
|
const prov0=NETS.filter(n=>sellsAt(n,c)).sort((a,b)=>a.price-b.price),prov=prov0.filter(n=>netKeep(n,S.transit.some(x=>x.city===c&&x.net===n.id)));
|
||||||
if(!prov.length)h+=`<p class="empty">${tr('city_panel.nobody_sells_transit_here_haul_your')}</p>`;
|
if(!prov0.length)h+=`<p class="empty">${tr('city_panel.nobody_sells_transit_here_haul_your')}</p>`;else if(!prov.length)h+=netNone();
|
||||||
for(const n of prov){const t=S.transit.find(x=>x.city===c&&x.net===n.id);const pr=transitPerG(n,c,premOnlyAt(n,c)||!!(t&&premOn(t)))*S.priceMul;
|
for(const n of prov){const t=S.transit.find(x=>x.city===c&&x.net===n.id);const pr=transitPerG(n,c,premOnlyAt(n,c)||!!(t&&premOn(t)))*S.priceMul;
|
||||||
h+=`<div class="row">${logo(n)}<div class="grow"><div class="nm">${esc(n.name)} <span class="tag ${n.type}">${TYPE_L[n.type]}</span></div><div class="meta">${tr('city_panel.price_per_gbps_month_billed_on',{price:pr.toFixed(2)})}</div>${premOnlyAt(n,c)&&!t?`<div class="meta">${tr('city_panel.only_the_cn_too_premium_crossing')}</div>`:''}`;
|
h+=`<div class="row">${logo(n)}<div class="grow"><div class="nm">${esc(n.name)} <span class="tag ${n.type}">${TYPE_L[n.type]}</span></div><div class="meta">${tr('city_panel.price_per_gbps_month_billed_on',{price:pr.toFixed(2)})}</div>${premOnlyAt(n,c)&&!t?`<div class="meta">${tr('city_panel.only_the_cn_too_premium_crossing')}</div>`:''}`;
|
||||||
if(t){const u=R.useT[t.id]||0,cap=lagCap(PORT[t.tier].g,t.n),tdown=t.down>S.day;
|
if(t){const u=R.useT[t.id]||0,cap=lagCap(PORT[t.tier].g,t.n),tdown=t.down>S.day;
|
||||||
|
|
@ -53,12 +53,12 @@ function cityPanel(c){
|
||||||
h+=`</div></div>`;}
|
h+=`</div></div>`;}
|
||||||
h+=`</section>`;
|
h+=`</section>`;
|
||||||
}else if(UI.tab==='peer'){
|
}else if(UI.tab==='peer'){
|
||||||
h+=portNote(c);
|
h+=netFilterHtml()+portNote(c);
|
||||||
h+=ixSection(c);
|
h+=ixSection(c);
|
||||||
h+=`<section><h3>${tr('city_panel.private_interconnects_pni')}</h3><p class="lead">${tr('city_panel.a_dedicated_cross_connect_to_one',{dc:esc(siteName(c,'a'))})}</p>`;
|
h+=`<section><h3>${tr('city_panel.private_interconnects_pni')}</h3><p class="lead">${tr('city_panel.a_dedicated_cross_connect_to_one',{dc:esc(siteName(c,'a'))})}</p>`;
|
||||||
h+=pniListHtml(c);
|
h+=pniListHtml(c);
|
||||||
h+=`</section><section><h3>${tr('common.embedded_caches')}</h3><p class="lead">${tr('city_panel.cdns_put_free_cache_servers_inside')}</p>`;
|
h+=`</section><section><h3>${tr('common.embedded_caches')}</h3><p class="lead">${tr('city_panel.cdns_put_free_cache_servers_inside')}</p>`;
|
||||||
for(const n of NETS.filter(n=>n.cache)){const have=S.caches.filter(x=>x.city===c&&x.net===n.id),dem=R.demTo[n.id]||0,ok=dem>=n.cache.min;
|
for(const n of NETS.filter(n=>n.cache&&netKeep(n,S.caches.some(x=>x.city===c&&x.net===n.id)))){const have=S.caches.filter(x=>x.city===c&&x.net===n.id),dem=R.demTo[n.id]||0,ok=dem>=n.cache.min;
|
||||||
h+=`<div class="row">${logo(n)}<div class="grow"><div class="nm">${esc(n.cache.name)}</div><div class="meta">${tr('common.from_net',{net:esc(n.name)})} · ${have.length?`${trn('common.n_box',have.length)} · ${tr('city_panel.serving_v',{v:fmtG(have.reduce((a,x)=>a+(R.useCache[x.id]||0),0))})}`:tr('city_panel.100g_per_box')}</div>${!ok?`<div class="why">${tr('city_panel.needs_min_gbps_of_traffic_to',{min:n.cache.min,net:esc(n.name),now:dem.toFixed(1)})}</div>`:''}</div>
|
h+=`<div class="row">${logo(n)}<div class="grow"><div class="nm">${esc(n.cache.name)}</div><div class="meta">${tr('common.from_net',{net:esc(n.name)})} · ${have.length?`${trn('common.n_box',have.length)} · ${tr('city_panel.serving_v',{v:fmtG(have.reduce((a,x)=>a+(R.useCache[x.id]||0),0))})}`:tr('city_panel.100g_per_box')}</div>${!ok?`<div class="why">${tr('city_panel.needs_min_gbps_of_traffic_to',{min:n.cache.min,net:esc(n.name),now:dem.toFixed(1)})}</div>`:''}</div>
|
||||||
${have.length?btn(tr('common.remove'),'rmCache',{id:(have.find(x=>x.site==='b')||have[0]).id},'ghost sm'):''}${btn(have.length?tr('common.box'):tr('common.request'),'cache',{city:c,net:n.id},'sm',!ok)}</div>${S.pops[c].site2&&have.length?(()=>{const nb=have.filter(x=>x.site==='b').length,na=have.length-nb;return `<div class="seg site"><span class="meta">${tr('city_panel.boxes_a_in_a_b_in',{a:na,b:nb})}</span>${na?btn(tr('city_panel.move_one_to_b'),'cacheSite',{city:c,net:n.id,s:'b'},'ghost sm'):''}${nb?btn(tr('city_panel.move_one_to_a'),'cacheSite',{city:c,net:n.id,s:'a'},'ghost sm'):''}</div>`;})():''}`;}
|
${have.length?btn(tr('common.remove'),'rmCache',{id:(have.find(x=>x.site==='b')||have[0]).id},'ghost sm'):''}${btn(have.length?tr('common.box'):tr('common.request'),'cache',{city:c,net:n.id},'sm',!ok)}</div>${S.pops[c].site2&&have.length?(()=>{const nb=have.filter(x=>x.site==='b').length,na=have.length-nb;return `<div class="seg site"><span class="meta">${tr('city_panel.boxes_a_in_a_b_in',{a:na,b:nb})}</span>${na?btn(tr('city_panel.move_one_to_b'),'cacheSite',{city:c,net:n.id,s:'b'},'ghost sm'):''}${nb?btn(tr('city_panel.move_one_to_a'),'cacheSite',{city:c,net:n.id,s:'a'},'ghost sm'):''}</div>`;})():''}`;}
|
||||||
h+=`</section>`;
|
h+=`</section>`;
|
||||||
|
|
@ -75,7 +75,7 @@ function cityPanel(c){
|
||||||
${nl>=nc*0.95?`<p class="why">${tr('city_panel.maxed_out_traffic_here_is_being')}</p>`:''}
|
${nl>=nc*0.95?`<p class="why">${tr('city_panel.maxed_out_traffic_here_is_being')}</p>`:''}
|
||||||
<div class="btns">${N?(!techOk('rg',Ni,N.lvl)?demoBtn('rg',Ni,N.lvl,tr('city_panel.model_level_lv',{model:esc(N.n),lv:N.lvl}),'pink'):btn(tr('city_panel.upgrade_to_model_cost_mo_mo',{model:esc(N.n),cost:fmt$(swapCost(c,Ni)),mo:fmt$(N.mo*rt)}),'upRouter',{city:c,g:Ni},'pink',S.cash<swapCost(c,Ni)||p.rupDay===S.day)):''}${btn(UI.models?tr('city_panel.hide_other_models'):tr('common.other_models'),'models',{},'ghost sm')}${rt<RMAX?btn(tr('city_panel.add_router_cost_mo_mo',{cost:fmt$(routerCost(g,rt)),mo:fmt$(routerMo(g)+(rt>=RCAGE?CAGE_MO:0))}),'addRouter',{city:c},'',S.cash<routerCost(g,rt)):''}${rt>1?btn(tr('common.remove_one'),'rmRouter',{city:c},'ghost sm'):''}</div>
|
<div class="btns">${N?(!techOk('rg',Ni,N.lvl)?demoBtn('rg',Ni,N.lvl,tr('city_panel.model_level_lv',{model:esc(N.n),lv:N.lvl}),'pink'):btn(tr('city_panel.upgrade_to_model_cost_mo_mo',{model:esc(N.n),cost:fmt$(swapCost(c,Ni)),mo:fmt$(N.mo*rt)}),'upRouter',{city:c,g:Ni},'pink',S.cash<swapCost(c,Ni)||p.rupDay===S.day)):''}${btn(UI.models?tr('city_panel.hide_other_models'):tr('common.other_models'),'models',{},'ghost sm')}${rt<RMAX?btn(tr('city_panel.add_router_cost_mo_mo',{cost:fmt$(routerCost(g,rt)),mo:fmt$(routerMo(g)+(rt>=RCAGE?CAGE_MO:0))}),'addRouter',{city:c},'',S.cash<routerCost(g,rt)):''}${rt>1?btn(tr('common.remove_one'),'rmRouter',{city:c},'ghost sm'):''}</div>
|
||||||
${rt>=RCAGE&&rt<RMAX?`<p class="note">${tr('city_panel.the_standard_cage_holds_n_routers',{n:RCAGE,mo:fmt$(CAGE_MO)})}</p>`:''}${rt>=RMAX?`<p class="note">${tr('city_panel.this_pop_has_the_most_routers',{n:RMAX})}</p>`:''}${rt>RCAGE?`<div class="kv"><span>${tr('city_panel.cage_extension')}</span><b>${fmt$(cageMo(rt))}/mo</b></div>`:''}
|
${rt>=RCAGE&&rt<RMAX?`<p class="note">${tr('city_panel.the_standard_cage_holds_n_routers',{n:RCAGE,mo:fmt$(CAGE_MO)})}</p>`:''}${rt>=RMAX?`<p class="note">${tr('city_panel.this_pop_has_the_most_routers',{n:RMAX})}</p>`:''}${rt>RCAGE?`<div class="kv"><span>${tr('city_panel.cage_extension')}</span><b>${fmt$(cageMo(rt))}/mo</b></div>`:''}
|
||||||
${popStdHtml(c)}
|
${popStdHtml(c)}${popTierHtml(c)}
|
||||||
${UI.models?routerModels(c):''}
|
${UI.models?routerModels(c):''}
|
||||||
${N||UI.models?`<p class="note">${(p.rgen||0)>0?tr('city_panel.prices_include_p_back_for_the',{p:fmt$(tradeIn(p.rgen||0,rt))})+' ':''}${p.rupDay===S.day?tr('city_panel.new_routers_went_in_today_the')+' ':''}${rt>1?tr('city_panel.rolling_upgrade_one_router_at_a'):tr('city_panel.with_one_router_the_upgrade_needs')}</p>`:''}
|
${N||UI.models?`<p class="note">${(p.rgen||0)>0?tr('city_panel.prices_include_p_back_for_the',{p:fmt$(tradeIn(p.rgen||0,rt))})+' ':''}${p.rupDay===S.day?tr('city_panel.new_routers_went_in_today_the')+' ':''}${rt>1?tr('city_panel.rolling_upgrade_one_router_at_a'):tr('city_panel.with_one_router_the_upgrade_needs')}</p>`:''}
|
||||||
<p class="note">${rt>=2?tr('city_panel.a_crash_here_only_costs_one'):tr('city_panel.one_router_is_a_single_point')}</p></section>
|
<p class="note">${rt>=2?tr('city_panel.a_crash_here_only_costs_one'):tr('city_panel.one_router_is_a_single_point')}</p></section>
|
||||||
|
|
|
||||||
14
src/game/93-ui/51-net-filter.js
Normal file
14
src/game/93-ui/51-net-filter.js
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
/* ---------- Find a network at a POP (#199) ----------
|
||||||
|
The Transit and Peering tabs list every network that sells or peers there: dozens in a big city. One search box and a
|
||||||
|
"connected only" switch filter all of them (transit, exchange members, PNIs, caches). View state only, never saved;
|
||||||
|
it stays while you hop between POPs, and a Clear button says it is on. */
|
||||||
|
const netQ=()=>(UI.netQ||'').trim().toLowerCase();
|
||||||
|
const netFiltered=()=>!!netQ()||!!UI.netOnly;
|
||||||
|
// on: connected to that network in this list (a transit port, a session, a PNI, a cache box). A number finds an AS.
|
||||||
|
function netKeep(n,on){const q=netQ();if(q&&!n.name.toLowerCase().includes(q)&&!(n.asn&&String(n.asn).startsWith(q)))return false;return !UI.netOnly||!!on;}
|
||||||
|
function netFilterHtml(){return `<div class="netf"><input type="search" id="netQ" class="t" value="${esc(UI.netQ||'')}" maxlength="40" autocomplete="off" placeholder="${esc(tr('net_filter.find_a_network'))}" aria-label="${esc(tr('net_filter.find_a_network'))}">
|
||||||
|
<div class="btns">${btn(tr('net_filter.connected_only'),'netOnly',{},UI.netOnly?'green sm':'ghost sm')}${netFiltered()?btn(tr('net_filter.clear'),'netClear',{},'ghost sm'):''}</div></div>`;}
|
||||||
|
const netNone=()=>`<p class="empty">${tr('pni_list.nothing_matches')}</p>`;
|
||||||
|
// Typing redraws the panel. The morph swaps an input whose value changed, so the new box gets the focus and the caret back.
|
||||||
|
document.addEventListener('input',e=>{if(e.target.id!=='netQ'||!S)return;const at=e.target.selectionStart;ACT.netFind({q:e.target.value});
|
||||||
|
const n=$('netQ');if(n&&n!==e.target){n.focus();try{n.setSelectionRange(at,at);}catch(err){}}});
|
||||||
|
|
@ -15,7 +15,8 @@ function pniRow(c,n,pn,v,chk){let h=`<div class="row prow">${logo(n)}<div class=
|
||||||
else{h+=chk.ok?`<div class="btns">${pniG1(n.id)?btn(tr('city_panel.port_cost_mo_mo',{port:'1G',cost:fmt$(PNI_G1_COST),mo:fmt$(Math.round(PORT[0].pni/2))}),'pni',{city:c,net:n.id,tier:-1},'sm',S.cash<PNI_G1_COST||!portOk(c,0)):''}${PORT.map((P2,i)=>portShown(i)&&i>=pniMin(n.id)?btn(tr('city_panel.port_cost_mo_mo',{port:P2.n,cost:fmt$(1500+P2.setup/2),mo:fmt$(P2.pni)}),'pni',{city:c,net:n.id,tier:i},'sm',S.cash<1500+P2.setup/2||!portOk(c,i)):'').join('')}</div><div class="meta">${pniEta(n.id)}${pniMin(n.id)?' · '+tr('city_panel.no_10g_net_starts_at_100g',{net:esc(n.name)}):pniG1(n.id)?' · '+tr('city_panel.sells_pnis_down_to_1g'):''}</div>${chk.fee?`<div class="meta">${tr('city_panel.paid_peering_price_mo_on_top',{price:fmt$(chk.fee)})}</div>`:''}`:`<div class="why">${esc(chk.why)}</div>`;}
|
else{h+=chk.ok?`<div class="btns">${pniG1(n.id)?btn(tr('city_panel.port_cost_mo_mo',{port:'1G',cost:fmt$(PNI_G1_COST),mo:fmt$(Math.round(PORT[0].pni/2))}),'pni',{city:c,net:n.id,tier:-1},'sm',S.cash<PNI_G1_COST||!portOk(c,0)):''}${PORT.map((P2,i)=>portShown(i)&&i>=pniMin(n.id)?btn(tr('city_panel.port_cost_mo_mo',{port:P2.n,cost:fmt$(1500+P2.setup/2),mo:fmt$(P2.pni)}),'pni',{city:c,net:n.id,tier:i},'sm',S.cash<1500+P2.setup/2||!portOk(c,i)):'').join('')}</div><div class="meta">${pniEta(n.id)}${pniMin(n.id)?' · '+tr('city_panel.no_10g_net_starts_at_100g',{net:esc(n.name)}):pniG1(n.id)?' · '+tr('city_panel.sells_pnis_down_to_1g'):''}</div>${chk.fee?`<div class="meta">${tr('city_panel.paid_peering_price_mo_on_top',{price:fmt$(chk.fee)})}</div>`:''}`:`<div class="why">${esc(chk.why)}</div>`;}
|
||||||
return h+`</div></div>`;}
|
return h+`</div></div>`;}
|
||||||
function pniListHtml(c){const f=UI.pniF||'all',az=UI.pniSort==='az',open=UI.pniOpen||{};
|
function pniListHtml(c){const f=UI.pniF||'all',az=UI.pniSort==='az',open=UI.pniOpen||{};
|
||||||
const rows=NETS.filter(n=>n.pops.includes(c)).map(n=>{const pn=S.pni.find(x=>x.city===c&&x.net===n.id)||null;const chk=pn?null:peerOk(n.id,'pni',c),v=pn?null:pniVal(n.id,c);return {n,pn,v,chk,s:pniStat(n.id,c).k,go:!!pn||(chk.ok&&v.g>=1)};});
|
// The search (#199) first: a network it hides needs no value worked out.
|
||||||
|
const rows=NETS.filter(n=>n.pops.includes(c)).map(n=>[n,S.pni.find(x=>x.city===c&&x.net===n.id)||null]).filter(([n,pn])=>netKeep(n,pn)).map(([n,pn])=>{const chk=pn?null:peerOk(n.id,'pni',c),v=pn?null:pniVal(n.id,c);return {n,pn,v,chk,s:pniStat(n.id,c).k,go:!!pn||(chk.ok&&v.g>=1)};});
|
||||||
const keep=r=>f==='all'||(f==='t'&&(r.s==='t'||r.s==='none'))||(f==='worth'&&r.v&&r.v.worth)||(f==='pni'&&(r.s==='here'||r.s==='else'));
|
const keep=r=>f==='all'||(f==='t'&&(r.s==='t'||r.s==='none'))||(f==='worth'&&r.v&&r.v.worth)||(f==='pni'&&(r.s==='here'||r.s==='else'));
|
||||||
const val=r=>r.v?r.v.val:-Infinity;
|
const val=r=>r.v?r.v.val:-Infinity;
|
||||||
rows.sort((a,b)=>az?a.n.name.localeCompare(b.n.name):(b.v&&b.v.worth)-(a.v&&a.v.worth)||val(b)-val(a)||a.n.name.localeCompare(b.n.name));
|
rows.sort((a,b)=>az?a.n.name.localeCompare(b.n.name):(b.v&&b.v.worth)-(a.v&&a.v.worth)||val(b)-val(a)||a.n.name.localeCompare(b.n.name));
|
||||||
|
|
@ -23,7 +24,7 @@ function pniListHtml(c){const f=UI.pniF||'all',az=UI.pniSort==='az',open=UI.pniO
|
||||||
const shown=rows.filter(keep);if(!shown.length)return h+`<p class="empty">${tr('pni_list.nothing_matches')}</p>`;
|
const shown=rows.filter(keep);if(!shown.length)return h+`<p class="empty">${tr('pni_list.nothing_matches')}</p>`;
|
||||||
let left=listN('pni'),tot=0;
|
let left=listN('pni'),tot=0;
|
||||||
for(const g of PNI_GRP){const gr=shown.filter(r=>pniGrpOf(r.n)===g);if(!gr.length)continue;
|
for(const g of PNI_GRP){const gr=shown.filter(r=>pniGrpOf(r.n)===g);if(!gr.length)continue;
|
||||||
const w=gr.filter(r=>r.v&&r.v.worth).length,act=w||gr.some(r=>r.go),isOpen=f!=='all'||(open[g]??act);
|
const w=gr.filter(r=>r.v&&r.v.worth).length,act=w||gr.some(r=>r.go),isOpen=f!=='all'||netFiltered()||(open[g]??act);
|
||||||
h+=`<div class="pgrp">${btn(`${isOpen?'▾':'▸'} ${esc(pniGrpL(g))} <small>${trn('pni_list.n_networks_w_worth_it',gr.length,{w})}</small>`,'pniGrp',{g,o:isOpen?0:1},'ghost sm')}</div>`;
|
h+=`<div class="pgrp">${btn(`${isOpen?'▾':'▸'} ${esc(pniGrpL(g))} <small>${trn('pni_list.n_networks_w_worth_it',gr.length,{w})}</small>`,'pniGrp',{g,o:isOpen?0:1},'ghost sm')}</div>`;
|
||||||
if(!isOpen)continue;tot+=gr.length;
|
if(!isOpen)continue;tot+=gr.length;
|
||||||
for(const r of gr){if(left--<=0)break;h+=pniRow(c,r.n,r.pn,r.v,r.chk);}}
|
for(const r of gr){if(left--<=0)break;h+=pniRow(c,r.n,r.pn,r.v,r.chk);}}
|
||||||
|
|
|
||||||
|
|
@ -26,5 +26,13 @@ function utilitiesModal(city,message){if(!S)return;const cities=Object.keys(S.po
|
||||||
${ppol()!=='open'?`<p class="why">${tr('link_panels.off_while_your_peering_policy_is',{pol:tr(PPOL_N[ppol()])})}</p>${btn(tr('common.peering_policy'),'leftTab',{t:'nets'},'ghost sm')}`:''}
|
${ppol()!=='open'?`<p class="why">${tr('link_panels.off_while_your_peering_policy_is',{pol:tr(PPOL_N[ppol()])})}</p>${btn(tr('common.peering_policy'),'leftTab',{t:'nets'},'ghost sm')}`:''}
|
||||||
${rows.map(r=>`<details><summary>${esc(ixName(r.ix))} · ${tr('utilities.peer_counts',{ready:r.requests.length,existing:r.existing,blocked:r.blocked.length})}</summary>
|
${rows.map(r=>`<details><summary>${esc(ixName(r.ix))} · ${tr('utilities.peer_counts',{ready:r.requests.length,existing:r.existing,blocked:r.blocked.length})}</summary>
|
||||||
${r.blocked.map(b=>`<p class="meta"><b>${esc(NET[b.id].name)}</b>: ${esc(b.why)}</p>`).join('')}</details>`).join('')}</section>
|
${r.blocked.map(b=>`<p class="meta"><b>${esc(NET[b.id].name)}</b>: ${esc(b.why)}</p>`).join('')}</details>`).join('')}</section>
|
||||||
|
${utilityKitAllHtml(city)}${popTierAllHtml(city)}
|
||||||
${cities.length?`<section><label for="utilityCity">${tr('common.your_pop')}</label><div class="btns"><select id="utilityCity" style="max-width:100%">${cities.map(c=>`<option value="${c}"${c===city?' selected':''}>${esc(CITY[c].name)}</option>`).join('')}</select>${btn(tr('utilities.view_pop'),'utilityPick',{},'sm')}</div></section>${utilityKitHtml(city,true)}`:''}`);
|
${cities.length?`<section><label for="utilityCity">${tr('common.your_pop')}</label><div class="btns"><select id="utilityCity" style="max-width:100%">${cities.map(c=>`<option value="${c}"${c===city?' selected':''}>${esc(CITY[c].name)}</option>`).join('')}</select>${btn(tr('utilities.view_pop'),'utilityPick',{},'sm')}</div></section>${utilityKitHtml(city,true)}`:''}`);
|
||||||
}
|
}
|
||||||
|
// The kit everywhere (#317), and where new POPs get it: the intern's template, which the intern clicks through.
|
||||||
|
function utilityKitAllHtml(city){const q=utilityKitAll();if(!q)return '';const tpl=opsHired()&&S.ops.tpl.kit;
|
||||||
|
return `<section><h3>${tr('utilities.kit_everywhere')}</h3><p class="lead">${tr('utilities.kit_everywhere_note')}</p>
|
||||||
|
${q.cities.length?`<p class="meta">${trn('utilities.kit_all_quote',q.cities.length,{cost:fmt$(q.cost),mo:fmt$(q.mo)})}${q.moves?' · '+tr('utilities.cache_moves',{n:q.moves}):''}</p>
|
||||||
|
<div class="btns">${btn(trn('utilities.kit_all_apply',q.cities.length,{cost:fmt$(q.cost)}),'utilityKitAll',{cost:q.cost,city},'pink',S.cash<q.cost)}</div>`:`<p class="meta">${tr('utilities.kit_all_done')}</p>`}
|
||||||
|
<p class="note">${opsHired()?(tpl?tr('utilities.kit_new_pops_on',{name:opsName()}):tr('utilities.kit_new_pops_off',{name:opsName()})):tr('utilities.kit_new_pops_hire')}</p>
|
||||||
|
${opsHired()?`<div class="btns">${btn(tpl?tr('utilities.kit_new_pops_stop'):tr('utilities.kit_new_pops_start'),'utilityKitNew',{city},tpl?'ghost sm':'sm')}</div>`:''}</section>`;}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ function ixBlock(c,multi){const city=ixCity(c),C=CITY[city],ix=ixName(c),X=XIXM[
|
||||||
else h+=`<div class="btns">${PORT.map((P2,i)=>i>S.ixp[c]&&portShown(i)?btn(tr('common.upgrade_port_price',{port:P2.n,price:portMo(ixPortMo(c,i)*((S.ixn||{})[c]||1))}),'buyIx',{city:c,tier:i},'sm',(!!S.pops[city]&&!portOk(city,i))||(!S.pops[city]&&i>1)):'').join('')}${S.pops[city]&&((S.ixn||{})[c]||1)<LAG_MAX?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])):''}${((S.ixn||{})[c]||1)>1?btn(tr('common.member'),'lagIx',{city:c,d:-1},'ghost sm'):''}${S.ixp[c]>0?btn(tr('link_panels.downgrade_port_price',{port:PORT[S.ixp[c]-1].n,price:portMo(ixPortMo(c,S.ixp[c]-1)*((S.ixn||{})[c]||1))}),'downIx',{city:c},'ghost sm'):''}${btn(S.rs[c]?tr('link_panels.leave_route_server'):tr('link_panels.join_route_server'),'rs',{city:c},S.rs[c]?'ghost sm':'pink sm')}${S.rs[c]&&ppol()!=='open'?`<span class="meta">${tr('link_panels.off_while_your_peering_policy_is',{pol:tr(PPOL_N[ppol()])})}</span>`:''}${btn(UI.confirm==='ix'+c?tr('common.really_leave'):tr('common.leave_ix'),'cancelIx',{city:c},'ghost sm')}</div>`;
|
else h+=`<div class="btns">${PORT.map((P2,i)=>i>S.ixp[c]&&portShown(i)?btn(tr('common.upgrade_port_price',{port:P2.n,price:portMo(ixPortMo(c,i)*((S.ixn||{})[c]||1))}),'buyIx',{city:c,tier:i},'sm',(!!S.pops[city]&&!portOk(city,i))||(!S.pops[city]&&i>1)):'').join('')}${S.pops[city]&&((S.ixn||{})[c]||1)<LAG_MAX?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])):''}${((S.ixn||{})[c]||1)>1?btn(tr('common.member'),'lagIx',{city:c,d:-1},'ghost sm'):''}${S.ixp[c]>0?btn(tr('link_panels.downgrade_port_price',{port:PORT[S.ixp[c]-1].n,price:portMo(ixPortMo(c,S.ixp[c]-1)*((S.ixn||{})[c]||1))}),'downIx',{city:c},'ghost sm'):''}${btn(S.rs[c]?tr('link_panels.leave_route_server'):tr('link_panels.join_route_server'),'rs',{city:c},S.rs[c]?'ghost sm':'pink sm')}${S.rs[c]&&ppol()!=='open'?`<span class="meta">${tr('link_panels.off_while_your_peering_policy_is',{pol:tr(PPOL_N[ppol()])})}</span>`:''}${btn(UI.confirm==='ix'+c?tr('common.really_leave'):tr('common.leave_ix'),'cancelIx',{city:c},'ghost sm')}</div>`;
|
||||||
h+=`<div style="margin-top:8px">`;
|
h+=`<div style="margin-top:8px">`;
|
||||||
{const elig=mine?[]:ixMembers(c).filter(id=>!set.has(id)&&peerOk(id,'ix',c).ok);if(elig.length>1)h+=`<div class="btns">${btn(tr('link_panels.request_all_n_willing_peers',{n:elig.length}),'peerAll',{city:c},'pink sm')}</div>`;}
|
{const elig=mine?[]:ixMembers(c).filter(id=>!set.has(id)&&peerOk(id,'ix',c).ok);if(elig.length>1)h+=`<div class="btns">${btn(tr('link_panels.request_all_n_willing_peers',{n:elig.length}),'peerAll',{city:c},'pink sm')}</div>`;}
|
||||||
for(const id of ixMembers(c).sort((a,b)=>NSH[b]-NSH[a])){const n=NET[id],on=set.has(id),viaRs=on&&!S.peers[id+'@'+c]&&!mine,chk=peerOk(id,'ix',c);
|
{const ms=ixMembers(c),shown=ms.filter(id=>netKeep(NET[id],set.has(id)));if(ms.length&&!shown.length)h+=netNone();}
|
||||||
|
for(const id of ixMembers(c).filter(id=>netKeep(NET[id],set.has(id))).sort((a,b)=>NSH[b]-NSH[a])){const n=NET[id],on=set.has(id),viaRs=on&&!S.peers[id+'@'+c]&&!mine,chk=peerOk(id,'ix',c);
|
||||||
h+=`<div class="row">${logo(n)}<div class="grow"><div class="nm">${esc(n.name)}</div><div class="meta"><span class="tag ${n.type}">${TYPE_L[n.type]}</span> <span class="tag ${n.pol}">${n.pol}</span> · ${(NSH[id]*100).toFixed(NSH[id]<0.01?1:0)}%${n.tail?' <span class="tag st">'+tr('common.tiny')+'</span>':''}</div>${!on&&!chk.ok?`<div class="why">${esc(chk.why)}</div>`:''}</div>
|
h+=`<div class="row">${logo(n)}<div class="grow"><div class="nm">${esc(n.name)}</div><div class="meta"><span class="tag ${n.type}">${TYPE_L[n.type]}</span> <span class="tag ${n.pol}">${n.pol}</span> · ${(NSH[id]*100).toFixed(NSH[id]<0.01?1:0)}%${n.tail?' <span class="tag st">'+tr('common.tiny')+'</span>':''}</div>${!on&&!chk.ok?`<div class="why">${esc(chk.why)}</div>`:''}</div>
|
||||||
${on?(viaRs||mine?`<span class="tag st on">${mine?tr('common.member_fef5'):tr('common.via_rs')}</span>`:btn(tr('common.peered_ce2f'),'unpeer',{city:c,net:id},'green sm',false,tr('link_panels.click_to_tear_down'))):btn(tr('common.request'),'peer',{city:c,net:id},'sm',!chk.ok)}</div>`;}
|
${on?(viaRs||mine?`<span class="tag st on">${mine?tr('common.member_fef5'):tr('common.via_rs')}</span>`:btn(tr('common.peered_ce2f'),'unpeer',{city:c,net:id},'green sm',false,tr('link_panels.click_to_tear_down'))):btn(tr('common.request'),'peer',{city:c,net:id},'sm',!chk.ok)}</div>`;}
|
||||||
h+=`</div>`;}
|
h+=`</div>`;}
|
||||||
|
|
@ -144,7 +145,7 @@ function dfPanel(l){
|
||||||
}
|
}
|
||||||
function offersHere(c){
|
function offersHere(c){
|
||||||
const os=S.offers.filter(o=>bCities(o).includes(c));if(!os.length)return '';
|
const os=S.offers.filter(o=>bCities(o).includes(c));if(!os.length)return '';
|
||||||
return `<section><h3>${tr('common.offers_here')}</h3>${os.map(o=>`<div class="row${o.id===UI.offerAt?' on':''}"><div class="grow"><div class="nm">${esc(o.name)}</div><div class="meta">${esc(BIZ_T[o.type].l)}${o.city2?` ${CITY[o.city].name} ⇄ ${CITY[o.city2].name}`:''} · ${bTerms(o)} · ${tr('ui.n_d_left',{n:o.exp-S.day})}</div>${spotWhy(o)}${R.reach<0.99&&!BIZ_T[o.type].l2?`<div class="why">${tr('link_panels.they_need_the_full_internet_your',{pct:pct(R.reach)})}</div>`:''}${o.type==='scrub'&&!hasScrub()?`<div class="why">${tr('link_panels.needs_your_own_scrubbing_center')}</div>`:''}${bRisk(o)}${reqList(o)}${bHas(o)?'':`<div class="why">${tr('link_panels.needs_a_pop_in_cities_too',{cities:bCities(o).filter(x=>!S.pops[x]).map(x=>CITY[x].name).join(', ')})}</div>`}</div>${bHas(o)?btn(tr('common.accept'),'accept',{id:o.id},'green sm'):''}${btn(tr('common.no'),'decline',{id:o.id},'ghost sm')}</div>`).join('')}</section>`;
|
return `<section><h3>${tr('common.offers_here')}</h3>${os.map(o=>`<div class="row${o.id===UI.offerAt?' on':''}"><div class="grow"><div class="nm">${esc(o.name)}</div><div class="meta">${esc(BIZ_T[o.type].l)}${o.city2?` ${CITY[o.city].name} ⇄ ${CITY[o.city2].name}`:''} · ${bTerms(o)} · ${tr('ui.n_d_left',{n:o.exp-S.day})}</div>${spotWhy(o)}${R.reach<0.99&&!BIZ_T[o.type].l2?`<div class="why">${tr('link_panels.they_need_the_full_internet_your',{pct:pct(R.reach)})}</div>`:''}${o.type==='scrub'&&!hasScrub()?`<div class="why">${tr('link_panels.needs_your_own_scrubbing_center')}</div>`:''}${bRisk(o)}${reqList(o)}${reqFixHtml(o)}${bHas(o)?'':`<div class="why">${tr('link_panels.needs_a_pop_in_cities_too',{cities:bCities(o).filter(x=>!S.pops[x]).map(x=>CITY[x].name).join(', ')})}</div>`}</div>${bHas(o)?btn(tr('common.accept'),'accept',{id:o.id},'green sm'):''}${btn(tr('common.no'),'decline',{id:o.id},'ghost sm')}</div>`).join('')}</section>`;
|
||||||
}
|
}
|
||||||
function linkPanel(id){
|
function linkPanel(id){
|
||||||
const l=S.links.find(x=>x.id===id);if(!l){UI.sel=null;return '';}
|
const l=S.links.find(x=>x.id===id);if(!l){UI.sel=null;return '';}
|
||||||
|
|
|
||||||
|
|
@ -3166,6 +3166,9 @@
|
||||||
"modal_and_names.the_real_thing_follow_a_packet":"The real thing: follow a packet from Wi-Fi to undersea fiber.",
|
"modal_and_names.the_real_thing_follow_a_packet":"The real thing: follow a packet from Wi-Fi to undersea fiber.",
|
||||||
"modals.lay_your_own_subsea_cable":"Lay your own subsea cable…",
|
"modals.lay_your_own_subsea_cable":"Lay your own subsea cable…",
|
||||||
"modals.your_own_subsea_cable_level_n":"Your own subsea cable <small>level {n} or Tier 1</small>",
|
"modals.your_own_subsea_cable_level_n":"Your own subsea cable <small>level {n} or Tier 1</small>",
|
||||||
|
"net_filter.clear":"Clear",
|
||||||
|
"net_filter.connected_only":"Connected only",
|
||||||
|
"net_filter.find_a_network":"Find a network or AS number",
|
||||||
"networks.a_mobile_network_named_after_the":"A mobile network named after the sound of a toast. Cheers to every 5G tower.",
|
"networks.a_mobile_network_named_after_the":"A mobile network named after the sound of a toast. Cheers to every 5G tower.",
|
||||||
"networks.a_spanish_carrier_starring_in_every":"A Spanish carrier starring in every Latin American market, at least until it sells the next one.",
|
"networks.a_spanish_carrier_starring_in_every":"A Spanish carrier starring in every Latin American market, at least until it sells the next one.",
|
||||||
"networks.a_tiny_telco_in_a_country":"A tiny telco in a country where the world’s cables come ashore. Prices to match.",
|
"networks.a_tiny_telco_in_a_country":"A tiny telco in a country where the world’s cables come ashore. Prices to match.",
|
||||||
|
|
@ -3401,6 +3404,7 @@
|
||||||
"ops.ops":"Ops",
|
"ops.ops":"Ops",
|
||||||
"ops.ops_name":"Ops · {name}",
|
"ops.ops_name":"Ops · {name}",
|
||||||
"ops.p_at":"Above",
|
"ops.p_at":"Above",
|
||||||
|
"ops.p_fresh":"Light new fiber",
|
||||||
"ops.p_g":"From",
|
"ops.p_g":"From",
|
||||||
"ops.p_how":"How",
|
"ops.p_how":"How",
|
||||||
"ops.p_keep":"Keep one spare",
|
"ops.p_keep":"Keep one spare",
|
||||||
|
|
@ -3932,6 +3936,29 @@
|
||||||
"pop_std.none":"None",
|
"pop_std.none":"None",
|
||||||
"pop_std.not_all_of_the_standard":"Not enough cash or level for the whole standard in {city}: it got what fit.",
|
"pop_std.not_all_of_the_standard":"Not enough cash or level for the whole standard in {city}: it got what fit.",
|
||||||
"pop_std.standard_for_new_pops":"Standard for new POPs",
|
"pop_std.standard_for_new_pops":"Standard for new POPs",
|
||||||
|
"pop_tiers.apply_cost":"Bring it up <small>{cost}</small>",
|
||||||
|
"pop_tiers.bring_up_n":{"one":"Bring {n} POP up <small>{cost}</small>","other":"Bring {n} POPs up <small>{cost}</small>"},
|
||||||
|
"pop_tiers.bulk_done":{"one":"{kind}: {n} POP brought up to the standard.","other":"{kind}: {n} POPs brought up to the standard."},
|
||||||
|
"pop_tiers.bulk_note":"Every POP you marked as a kind, brought up to its standard in one go. Change a standard (a new model, more routers) and press again.",
|
||||||
|
"pop_tiers.city_is_kind":"{city} meets the {kind} standard.",
|
||||||
|
"pop_tiers.hub":"Regional hub",
|
||||||
|
"pop_tiers.mark":"Mark it",
|
||||||
|
"pop_tiers.medium":"Medium POP",
|
||||||
|
"pop_tiers.meets_it":"Meets it",
|
||||||
|
"pop_tiers.micro":"Micro POP",
|
||||||
|
"pop_tiers.model_locked":"{model} unlocks at customer level {lv}.",
|
||||||
|
"pop_tiers.n_below":{"one":"{n} below the standard","other":"{n} below the standard"},
|
||||||
|
"pop_tiers.n_pops":{"one":"{n} POP","other":"{n} POPs"},
|
||||||
|
"pop_tiers.n_stuck":{"one":"{n} can't take it yet","other":"{n} can't take it yet"},
|
||||||
|
"pop_tiers.no_kind":"No kind yet",
|
||||||
|
"pop_tiers.not_all":"Not all of the standard went in at {city}. Check the Infra tab.",
|
||||||
|
"pop_tiers.not_set":"not set yet",
|
||||||
|
"pop_tiers.note":"Save a POP's routers as a standard, then mark other POPs as that kind. Bringing a POP up adds routers and swaps to the bigger model, never a step down. Utilities brings every POP of a kind up at once.",
|
||||||
|
"pop_tiers.save_here":"Save these routers",
|
||||||
|
"pop_tiers.saved":"{kind} is now {desc}.",
|
||||||
|
"pop_tiers.swapped_today":"The routers here were swapped today. Try again tomorrow.",
|
||||||
|
"pop_tiers.this_pop_is":"This POP: {kind}",
|
||||||
|
"pop_tiers.title":"POP standards",
|
||||||
"pops_transit_ix.40_off_for_6_months":"40% off for 6 months",
|
"pops_transit_ix.40_off_for_6_months":"40% off for 6 months",
|
||||||
"pops_transit_ix.40_off_ix_for_6_months":"<b>40% off {ix} for 6 months.</b><br>Your account manager is relieved. Read the small print later.",
|
"pops_transit_ix.40_off_ix_for_6_months":"<b>40% off {ix} for 6 months.</b><br>Your account manager is relieved. Read the small print later.",
|
||||||
"pops_transit_ix.after_consulting_with_management_the":"<b>\"After consulting with management…\"</b><br>The price went up. Management was consulted.",
|
"pops_transit_ix.after_consulting_with_management_the":"<b>\"After consulting with management…\"</b><br>The price went up. Management was consulted.",
|
||||||
|
|
@ -4199,6 +4226,12 @@
|
||||||
"release_notes.read_the_full_notes_on_github":"Read the full notes on GitHub",
|
"release_notes.read_the_full_notes_on_github":"Read the full notes on GitHub",
|
||||||
"release_notes.series_of_tubes_v_is_out":"Series of Tubes {v} is out!",
|
"release_notes.series_of_tubes_v_is_out":"Series of Tubes {v} is out!",
|
||||||
"release_notes.your_game_is_saved_automatically":"Your game is saved automatically.",
|
"release_notes.your_game_is_saved_automatically":"Your game is saved automatically.",
|
||||||
|
"req_fix.bought":"Bought {list} for {cost}.",
|
||||||
|
"req_fix.buy_and_sign":"Buy it and sign <small>{cost}</small>",
|
||||||
|
"req_fix.buys_list":"Missing: {list}. {cost} + {mo}/mo.",
|
||||||
|
"req_fix.generator_in_city":"a backup generator in {city}",
|
||||||
|
"req_fix.second_router_in_city":"a second router in {city}",
|
||||||
|
"req_fix.second_site_in_city":"a second site in {city}",
|
||||||
"requirements.a_spare_fiber_pair_in_your":"a spare fiber pair in your {a}–{b} trench",
|
"requirements.a_spare_fiber_pair_in_your":"a spare fiber pair in your {a}–{b} trench",
|
||||||
"requirements.afraid_of_sharks_needs_a_path":"Afraid of sharks: needs a path with no subsea cable",
|
"requirements.afraid_of_sharks_needs_a_path":"Afraid of sharks: needs a path with no subsea cable",
|
||||||
"requirements.backup_generator_in_every_city_they":"Backup generator in every city they touch",
|
"requirements.backup_generator_in_every_city_they":"Backup generator in every city they touch",
|
||||||
|
|
@ -4833,9 +4866,20 @@
|
||||||
"utilities.caches_requested":"Installed {n} cache boxes in {city}.",
|
"utilities.caches_requested":"Installed {n} cache boxes in {city}.",
|
||||||
"utilities.ix_peering":"Network-wide IX peering",
|
"utilities.ix_peering":"Network-wide IX peering",
|
||||||
"utilities.join_route_servers":"Join all route servers ({n})",
|
"utilities.join_route_servers":"Join all route servers ({n})",
|
||||||
|
"utilities.kit_all_applied":{"one":"Redundancy kit installed at {n} POP.","other":"Redundancy kit installed at {n} POPs."},
|
||||||
|
"utilities.kit_all_apply":{"one":"Kit {n} POP <small>{cost}</small>","other":"Kit all {n} POPs <small>{cost}</small>"},
|
||||||
|
"utilities.kit_all_done":"Every POP has the full kit.",
|
||||||
|
"utilities.kit_all_quote":{"one":"{n} POP needs it · {cost} + {mo}/mo","other":"{n} POPs need it · {cost} + {mo}/mo"},
|
||||||
"utilities.kit_applied":"Redundancy updated in {city}.",
|
"utilities.kit_applied":"Redundancy updated in {city}.",
|
||||||
"utilities.kit_balanced":"Hardware installed and caches balanced.",
|
"utilities.kit_balanced":"Hardware installed and caches balanced.",
|
||||||
"utilities.kit_cost":"One-off: {cost} · Additional monthly cost: {mo}",
|
"utilities.kit_cost":"One-off: {cost} · Additional monthly cost: {mo}",
|
||||||
|
"utilities.kit_everywhere":"Redundancy kit everywhere",
|
||||||
|
"utilities.kit_everywhere_note":"The kit at every POP still missing part of it: generator, second building, second router, caches balanced between sites. One price for all of them.",
|
||||||
|
"utilities.kit_new_pops_hire":"Hire a NOC intern to open new POPs from a template with the kit already in.",
|
||||||
|
"utilities.kit_new_pops_off":"New POPs opened from {name}'s template come without the kit.",
|
||||||
|
"utilities.kit_new_pops_on":"New POPs opened from {name}'s template get the kit too.",
|
||||||
|
"utilities.kit_new_pops_start":"Put the kit in the template",
|
||||||
|
"utilities.kit_new_pops_stop":"Leave it out of the template",
|
||||||
"utilities.peer_counts":"{ready} eligible · {existing} existing · {blocked} unavailable",
|
"utilities.peer_counts":"{ready} eligible · {existing} existing · {blocked} unavailable",
|
||||||
"utilities.peering_note":"Request eligible peers at every IX you have joined. Existing sessions, including route-server peers, are skipped. Refusals and traffic thresholds still apply. No ports or paid PNIs are purchased.",
|
"utilities.peering_note":"Request eligible peers at every IX you have joined. Existing sessions, including route-server peers, are skipped. Refusals and traffic thresholds still apply. No ports or paid PNIs are purchased.",
|
||||||
"utilities.peers_requested":"Established {n} new IX peering sessions.",
|
"utilities.peers_requested":"Established {n} new IX peering sessions.",
|
||||||
|
|
|
||||||
5
src/styles/36-net-filter.css
Normal file
5
src/styles/36-net-filter.css
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
/* Find a network at a POP (#199) and the POP standards rows (#315). */
|
||||||
|
.netf{display:flex;flex-direction:column;gap:6px;margin:0 0 10px}
|
||||||
|
.netf input.t{font-size:16px;padding:6px 10px;min-height:44px}
|
||||||
|
.netf .btns{margin:0}
|
||||||
|
.ptier .row .btns{margin-top:4px}
|
||||||
226
tests/bulk-actions.test.js
Normal file
226
tests/bulk-actions.test.js
Normal file
|
|
@ -0,0 +1,226 @@
|
||||||
|
// Late-game busywork: one policy or one button instead of many clicks, never a decision taken away.
|
||||||
|
// #316 the intern can leave new fiber dark, #119 the link panel stays open on a sibling, #317 the kit at every POP,
|
||||||
|
// #241 buy what a customer needs on signing, #315 POP standards by kind, #199 find a network at a POP.
|
||||||
|
const test = require('node:test');
|
||||||
|
const assert = require('node:assert/strict');
|
||||||
|
const { load } = require('./harness');
|
||||||
|
const { lit } = require('../scripts/lib/js-literal');
|
||||||
|
|
||||||
|
function setup(t, extra = '') {
|
||||||
|
const h = load();
|
||||||
|
t.after(() => h.dom.window.close());
|
||||||
|
h.ev("ACT.start({});S.cash=1e8;for(const g of GOALS)S.done[g.id]=0;S.nextFail=S.nextEvent=1e9;UI.speed=0;compute();" + extra);
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
const doc = h => h.dom.window.document;
|
||||||
|
const text = (h, sel) => [...doc(h).querySelectorAll(sel)].map(e => e.textContent).join('\n');
|
||||||
|
const reload = ev => ev("save();S=migrate(JSON.parse(slotRaw(UI.slot)));compute()");
|
||||||
|
|
||||||
|
/* ---------- #316: new fiber stays dark when the player says so ---------- */
|
||||||
|
const FIBER = "S.lvl=4;S.rules=makeRules('freeze');ACT.launchBB({city:'fra'});S.pops.fra.rgen=2;ACT.buildPop({city:'ams'});S.pops.ams.rgen=2;compute();" +
|
||||||
|
"ACT.opsHire({id:'kevin'});S.ops.floor=0;closeModal();" +
|
||||||
|
"S.links.push({id:'f',a:'fra',b:'ams',kind:'df',sys:'roadm',ch:[],km:450,sub:false,ready:0,cut:0,mo:1,trench:'f'});compute();S.ops.on.optics=true;";
|
||||||
|
const ch = ev => JSON.parse(ev("JSON.stringify(S.links.find(l=>l.id==='f').ch)"));
|
||||||
|
|
||||||
|
test('#316 by default the intern still lights new fiber, also in a save from before the switch', t => {
|
||||||
|
const { ev, errors } = setup(t, FIBER);
|
||||||
|
assert.equal(ev("opsP('optics','fresh')"), true);
|
||||||
|
ev("S.ops.p.optics={}");
|
||||||
|
reload(ev);
|
||||||
|
assert.equal(ev("opsP('optics','fresh')"), true, 'an old save has no setting: the old behaviour');
|
||||||
|
ev('opsDay(S.day)');
|
||||||
|
assert.ok(ch(ev).length > 0);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('#316 told not to, the intern leaves new fiber dark but still grows hot lit fiber', t => {
|
||||||
|
const { ev, errors } = setup(t, FIBER);
|
||||||
|
ev("ACT.opsOpen();ACT.opsParam({k:'optics',p:'fresh',v:1})");
|
||||||
|
assert.equal(ev("opsP('optics','fresh')"), false);
|
||||||
|
ev('opsDay(S.day)');
|
||||||
|
assert.deepEqual(ch(ev), [], 'dark fiber stays dark');
|
||||||
|
ev("S.links.find(l=>l.id==='f').ch=['zr8'];compute();R.load.f=dfCap(S.links.find(l=>l.id==='f'))*0.95;opsDay(S.day)");
|
||||||
|
assert.ok(ch(ev).length > 1, 'a lit, hot fiber still gets more optics');
|
||||||
|
reload(ev);
|
||||||
|
assert.equal(ev("opsP('optics','fresh')"), false, 'the switch survives a reload');
|
||||||
|
ev("S.ops.p.optics.fresh='maybe';S=migrate(JSON.parse(JSON.stringify(S)))");
|
||||||
|
assert.equal(ev("opsP('optics','fresh')"), true, 'a bad value is repaired to the default');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('#316 the switch is in the Ops sheet', t => {
|
||||||
|
const h = setup(t, FIBER);
|
||||||
|
h.ev('ACT.opsOpen()');
|
||||||
|
assert.match(h.ev("document.getElementById('modalCard').textContent"), /Light new fiber/);
|
||||||
|
assert.deepEqual(h.errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ---------- #119: decommissioning one of several waves keeps the panel open ---------- */
|
||||||
|
test('#119 the link panel moves on to the next parallel link, and closes after the last', t => {
|
||||||
|
const h = setup(t, "ACT.buildPop({city:'ams'});" +
|
||||||
|
"for(const id of ['w1','w2','w3'])S.links.push({id,a:'fra',b:'ams',kind:'wave',tier:0,km:450,sub:false,cut:0,mo:1000});compute();UI.sel={type:'link',id:'w1'};renderAll()");
|
||||||
|
const { ev, errors } = h;
|
||||||
|
ev("ACT.rmLink({id:'w1'});ACT.rmLink({id:'w1'})");
|
||||||
|
assert.equal(ev("S.links.some(l=>l.id==='w1')"), false);
|
||||||
|
assert.equal(ev('JSON.stringify(UI.sel)'), JSON.stringify({ type: 'link', id: 'w2' }));
|
||||||
|
assert.equal(ev("document.getElementById('panel').hidden"), false, 'the panel is still open');
|
||||||
|
ev("ACT.rmLink({id:'w2'});ACT.rmLink({id:'w2'})");
|
||||||
|
assert.equal(ev('UI.sel.id'), 'w3');
|
||||||
|
ev("ACT.rmLink({id:'w3'});ACT.rmLink({id:'w3'})");
|
||||||
|
assert.equal(ev('UI.sel'), null, 'the last link closes it');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ---------- #317: the redundancy kit at every POP ---------- */
|
||||||
|
const POPS = "for(const c of ['ams','lon','par'])ACT.buildPop({city:c});compute();";
|
||||||
|
test('#317 one button kits every POP, at the sum of the per-POP quotes', t => {
|
||||||
|
const { ev, errors } = setup(t, POPS + 'S.lvl=2;');
|
||||||
|
const q = JSON.parse(ev('JSON.stringify(utilityKitAll())'));
|
||||||
|
assert.equal(q.cities.length, 4);
|
||||||
|
assert.equal(q.cost, ev("Object.keys(S.pops).reduce((a,c)=>a+utilityKit(c).cost,0)"));
|
||||||
|
ev("ACT.utilities({})");
|
||||||
|
assert.match(ev("document.getElementById('modalCard').textContent"), /Kit all 4 POPs/);
|
||||||
|
const cash = ev('S.cash');
|
||||||
|
ev(`ACT.utilityKitAll({cost:${q.cost + 1}})`);
|
||||||
|
assert.equal(ev('S.cash'), cash, 'a stale quote buys nothing');
|
||||||
|
assert.match(ev("document.getElementById('modalCard').textContent"), /quote changed/);
|
||||||
|
ev(`ACT.utilityKitAll({cost:${q.cost}})`);
|
||||||
|
assert.equal(ev('S.cash'), cash - q.cost);
|
||||||
|
assert.equal(ev("Object.values(S.pops).every(p=>p.gen&&p.site2&&p.routers>=2)"), true);
|
||||||
|
assert.match(ev("document.getElementById('modalCard').textContent"), /Every POP has the full kit/);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('#317 needs level 2, never spends what is not there, and can put the kit in the intern\'s template', t => {
|
||||||
|
const { ev, errors } = setup(t, POPS);
|
||||||
|
ev('S.lvl=1;ACT.utilities({})');
|
||||||
|
assert.equal(ev('utilityKitAll()'), null);
|
||||||
|
assert.doesNotMatch(ev("document.getElementById('modalCard').textContent"), /Redundancy kit everywhere/);
|
||||||
|
ev('S.lvl=2;window.q=utilityKitAll().cost;S.cash=q-1;ACT.utilityKitAll({cost:q})');
|
||||||
|
assert.equal(ev('S.cash'), ev('q-1'));
|
||||||
|
assert.equal(ev("Object.values(S.pops).some(p=>p.gen)"), false);
|
||||||
|
ev("S.cash=1e8;ACT.opsHire({id:'annie'});closeModal();S.ops.tpl.kit=false;ACT.utilities({})");
|
||||||
|
assert.match(ev("document.getElementById('modalCard').textContent"), /come without the kit/);
|
||||||
|
ev('ACT.utilityKitNew({})');
|
||||||
|
assert.equal(ev('S.ops.tpl.kit'), true);
|
||||||
|
assert.match(ev("document.getElementById('modalCard').textContent"), /get the kit too/);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ---------- #241: buy what the customer asks for, on signing ---------- */
|
||||||
|
const OFFER = (reqs, extra = {}) => `ACT.buildPop({city:'ams'});S.offers.push(${lit({ id: 'o1', city: 'fra', city2: 'ams', name: 'Needy Corp', type: 'l2vpn', bw: 1, rate: 900, reqs, exp: 30, ...extra })});compute();`;
|
||||||
|
test('#241 the offer shows what is missing with its price, and one button buys it and signs', t => {
|
||||||
|
const h = setup(t, OFFER(['gen', 'routers']));
|
||||||
|
const { ev, errors } = h;
|
||||||
|
const q = JSON.parse(ev("JSON.stringify(reqFix(S.offers[0]))"));
|
||||||
|
assert.deepEqual(q.items.map(x => x.k + '@' + x.city), ['gen@fra', 'gen@ams', 'routers@fra']);
|
||||||
|
assert.equal(q.cost, ev("2*GEN_COST+routerCost(0,1)"));
|
||||||
|
ev("UI.left='deals';UI.leftOpen=true;window.innerWidth=390;renderAll()");
|
||||||
|
const card = text(h, '#left');
|
||||||
|
assert.match(card, /Missing: a backup generator in Frankfurt, a backup generator in Amsterdam, a second router in Frankfurt/);
|
||||||
|
assert.match(card, /Buy it and sign/);
|
||||||
|
assert.ok(doc(h).querySelector('[data-act="acceptFix"]'), 'the button is there on a phone');
|
||||||
|
const cash = ev('S.cash');
|
||||||
|
ev(`ACT.acceptFix({id:'o1',cost:${q.cost}})`);
|
||||||
|
assert.equal(ev('S.cash'), cash - q.cost);
|
||||||
|
assert.equal(ev("S.pops.fra.gen&&S.pops.ams.gen&&S.pops.fra.routers===2"), true);
|
||||||
|
assert.equal(ev("S.biz.some(b=>b.id==='o1')&&!S.offers.length"), true, 'signed');
|
||||||
|
assert.equal(ev("reqOk(S.biz.find(b=>b.id==='o1'))"), true, 'and every requirement is met');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('#241 never silent: a stale price, too little cash or a deal that cannot be signed buys nothing', t => {
|
||||||
|
const { ev, errors } = setup(t, OFFER(['metro']));
|
||||||
|
const cost = ev("reqFix(S.offers[0]).cost");
|
||||||
|
assert.equal(cost, ev('2*SITE2_COST'));
|
||||||
|
ev(`ACT.acceptFix({id:'o1',cost:${cost - 1}})`);
|
||||||
|
assert.equal(ev("!!S.pops.fra.site2||S.biz.length>0"), false);
|
||||||
|
ev(`S.cash=${cost - 1};ACT.acceptFix({id:'o1',cost:${cost}})`);
|
||||||
|
assert.equal(ev("!!S.pops.fra.site2||S.biz.length>0"), false);
|
||||||
|
ev(`S.cash=1e8;S.offers[0].city2='lon';ACT.acceptFix({id:'o1',cost:${cost}})`);
|
||||||
|
assert.equal(ev("!!S.pops.fra.site2||S.biz.length>0"), false, 'no POP in London: nothing is bought');
|
||||||
|
assert.equal(ev("reqFixHtml(S.offers[0])"), '');
|
||||||
|
ev("S.offers[0].city2='ams';S.offers[0].reqs=['nocog']");
|
||||||
|
assert.equal(ev("reqFix(S.offers[0])"), null, 'only hardware at a POP is offered');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ---------- #315: POP standards by kind ---------- */
|
||||||
|
test('#315 save a standard, bring a POP up to it, then every POP of that kind at once', t => {
|
||||||
|
const h = setup(t, POPS + "S.lvl=4;S.pops.fra.routers=2;S.pops.fra.rgen=1;compute();");
|
||||||
|
const { ev, errors } = h;
|
||||||
|
ev("UI.sel={type:'city',id:'fra'};UI.tab='links';window.innerWidth=390;renderAll()");
|
||||||
|
assert.match(text(h, '#panel'), /POP standards/);
|
||||||
|
assert.match(text(h, '#panel'), /Regional hub/);
|
||||||
|
ev("ACT.ptSave({city:'fra',k:'medium'})");
|
||||||
|
assert.equal(ev("JSON.stringify(S.popTiers.def.medium)"), JSON.stringify({ g: 1, rt: 2 }));
|
||||||
|
assert.equal(ev('S.popTiers.at.fra'), 'medium');
|
||||||
|
const q = JSON.parse(ev("JSON.stringify(ptPlan('ams','medium'))"));
|
||||||
|
assert.deepEqual(q.steps, ['swap', 'add'], 'an empty POP swaps first, then adds');
|
||||||
|
const cash = ev('S.cash');
|
||||||
|
ev(`ACT.ptApply({city:'ams',k:'medium',cost:${q.cost}})`);
|
||||||
|
assert.equal(ev('S.cash'), cash - q.cost, 'charged exactly the quote');
|
||||||
|
assert.equal(ev("S.pops.ams.routers===2&&S.pops.ams.rgen===1&&S.popTiers.at.ams==='medium'"), true);
|
||||||
|
// The standard grows: one button brings both medium POPs up.
|
||||||
|
ev("S.pops.fra.routers=3;S.pops.fra.rgen=2;S.pops.fra.rupDay=-1;ACT.ptSave({city:'fra',k:'medium'});S.pops.fra.routers=2;S.pops.fra.rgen=1;S.pops.ams.rupDay=-1;compute()");
|
||||||
|
const A = JSON.parse(ev("JSON.stringify({n:ptAll('medium').todo.length,cost:ptAll('medium').cost})"));
|
||||||
|
assert.equal(A.n, 2);
|
||||||
|
ev('ACT.utilities({})');
|
||||||
|
assert.match(ev("document.getElementById('modalCard').textContent"), /Bring 2 POPs up/);
|
||||||
|
ev(`ACT.ptAll({k:'medium',cost:${A.cost}})`);
|
||||||
|
assert.equal(ev("['fra','ams'].every(c=>S.pops[c].routers===3&&S.pops[c].rgen===2)"), true);
|
||||||
|
assert.equal(ev("ptAll('medium').todo.length"), 0);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('#315 a busy lone router gets its partner before the swap, and never a step down', t => {
|
||||||
|
const { ev, errors } = setup(t, POPS + "S.lvl=4;ACT.launchBB({city:'ams'});S.popTiers.def.hub={g:2,rt:2};S.popTiers.def.micro={g:0,rt:1};compute();");
|
||||||
|
assert.deepEqual(JSON.parse(ev("JSON.stringify(ptPlan('ams','hub').steps)")), ['add', 'swap']);
|
||||||
|
ev("ACT.ptApply({city:'ams',k:'hub',cost:ptPlan('ams','hub').cost})");
|
||||||
|
assert.equal(ev("S.pops.ams.routers===2&&S.pops.ams.rgen===2"), true);
|
||||||
|
assert.equal(ev("S.inc.some(i=>i.type==='maint'&&i.ref==='ams')"), false, 'a rolling upgrade, no maintenance window');
|
||||||
|
assert.equal(ev("ptPlan('ams','micro')"), null, 'a smaller standard asks for nothing');
|
||||||
|
ev("ACT.ptApply({city:'ams',k:'micro',cost:0})");
|
||||||
|
assert.equal(ev("S.pops.ams.rgen===2&&S.pops.ams.routers===2&&S.popTiers.at.ams==='micro'"), true, 'only marked');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('#315 level 1 has no standards, and saves old and broken load', t => {
|
||||||
|
const h = setup(t, POPS);
|
||||||
|
const { ev, errors } = h;
|
||||||
|
ev("UI.sel={type:'city',id:'fra'};UI.tab='links';renderAll()");
|
||||||
|
assert.doesNotMatch(text(h, '#panel'), /POP standards/);
|
||||||
|
ev("ACT.ptSave({city:'fra',k:'micro'})");
|
||||||
|
assert.equal(ev('S.popTiers.def.micro'), null);
|
||||||
|
ev('delete S.popTiers;S=migrate(JSON.parse(JSON.stringify(S)))');
|
||||||
|
assert.equal(ev('JSON.stringify(S.popTiers)'), JSON.stringify({ def: { micro: null, medium: null, hub: null }, at: {} }));
|
||||||
|
ev("S.popTiers={def:{micro:{g:999,rt:2},hub:{g:1,rt:99},bogus:{g:1,rt:1}},at:{fra:'hub',ams:'nope',xyz:'micro',ber:'hub'}};S=migrate(JSON.parse(JSON.stringify(S)))");
|
||||||
|
assert.equal(ev('JSON.stringify(S.popTiers)'), JSON.stringify({ def: { micro: null, medium: null, hub: { g: 1, rt: ev('RMAX') } }, at: { fra: 'hub' } }));
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ---------- #199: find a network at a POP ---------- */
|
||||||
|
test('#199 search and connected-only filter the transit, exchange and PNI lists, on a phone', t => {
|
||||||
|
const h = setup(t, "S.lvl=4;ACT.buyTransit({city:'fra',net:'cog',tier:0});compute();window.innerWidth=390;UI.sel={type:'city',id:'fra'};UI.tab='up';renderAll()");
|
||||||
|
const { ev, errors } = h;
|
||||||
|
const rows = () => [...doc(h).querySelectorAll('#panel .row .nm')].map(e => e.textContent.trim());
|
||||||
|
const all = rows().length;
|
||||||
|
assert.ok(doc(h).getElementById('netQ'), 'the search box is there');
|
||||||
|
ev("ACT.netOnly()");
|
||||||
|
assert.equal(rows().length, 1);
|
||||||
|
assert.match(rows()[0], /Cogentle/);
|
||||||
|
ev("ACT.netClear()");
|
||||||
|
assert.equal(rows().length, all);
|
||||||
|
// Typing into the box filters as you go, and the box keeps focus and text.
|
||||||
|
ev("const i=document.getElementById('netQ');i.focus();i.value='goggle';i.dispatchEvent(new window.Event('input',{bubbles:true}))");
|
||||||
|
assert.equal(ev("document.activeElement.id"), 'netQ');
|
||||||
|
assert.equal(ev("UI.netQ"), 'goggle');
|
||||||
|
ev("UI.tab='peer';renderAll()");
|
||||||
|
const peer = rows();
|
||||||
|
assert.ok(peer.length > 0 && peer.every(r => /Goggle/.test(r)), peer.join(' | '));
|
||||||
|
ev("ACT.netFind({q:'zzzz'})");
|
||||||
|
assert.match(text(h, '#panel'), /No network here matches this filter/);
|
||||||
|
ev("ACT.netFind({q:String(NET.ggl.asn)})");
|
||||||
|
assert.match(text(h, '#panel'), /Goggle/, 'an AS number finds the network');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
@ -226,7 +226,7 @@ test('a dry run prices every command that has a price, and changes nothing', ()
|
||||||
setChCount: { id: df, o: 'zr4', n: 2 }, repayLoan: { id: 'none' }, buildScrub: { city: 'ams', tier: 1 }, scrubUp: { city: 'fra', tier: 1 },
|
setChCount: { id: df, o: 'zr4', n: 2 }, repayLoan: { id: 'none' }, buildScrub: { city: 'ams', tier: 1 }, scrubUp: { city: 'fra', tier: 1 },
|
||||||
fixInc: { id: 'none' }, confGo: { key: T('catalog', { name: 'conferences' })[0].key }, confSponsor: { key: T('catalog', { name: 'conferences' })[0].key },
|
fixInc: { id: 'none' }, confGo: { key: T('catalog', { name: 'conferences' })[0].key }, confSponsor: { key: T('catalog', { name: 'conferences' })[0].key },
|
||||||
opsHire: { id: ev('Object.keys(INTERNS)[0]') }, opsNewPop: { city: 'nyc' }, pniAll: { net: 'cog', tier: 1 }, seatBuy: { n: 2 }, layShip: { id: df }, seaRush: { id: df },
|
opsHire: { id: ev('Object.keys(INTERNS)[0]') }, opsNewPop: { city: 'nyc' }, pniAll: { net: 'cog', tier: 1 }, seatBuy: { n: 2 }, layShip: { id: df }, seaRush: { id: df },
|
||||||
utilityKit: { city: 'fra' }, utilityCaches: { city: 'fra' }, teDeploy: { script: 'spill at 85%' }, upLinkX: {},
|
utilityKit: { city: 'fra' }, utilityCaches: { city: 'fra' }, acceptFix: { id: 'none' }, ptApply: { city: 'fra', k: 'medium' }, ptAll: { k: 'medium' }, teDeploy: { script: 'spill at 85%' }, upLinkX: {},
|
||||||
pieRd: { k: 'reuse' }, pieAnt: { id: 'none' },
|
pieRd: { k: 'reuse' }, pieAnt: { id: 'none' },
|
||||||
};
|
};
|
||||||
const missing = quoted.filter((n) => !sample[n] && T('schema', { section: 'commands' })[n].args.some((a) => a.required));
|
const missing = quoted.filter((n) => !sample[n] && T('schema', { section: 'commands' })[n].args.some((a) => a.required));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue