{{/* /fleet/economics (Task 13): the operator unit-economics dashboard. Everything on this page renders server-side from EconomicsView, which is already priced under the active scenario (economicsview.go) — the ONE inline {{template "bottom" .}}{{end}} {{/* econ_knob_drawer: the "Pricing knobs"
— every rate-card, allocation, mode/margin, rate-sheet and free-tier input, plus the save-as-scenario form. Shared verbatim between /fleet/economics (Task 13) and /fleet/economics/accounts (Task 14): both pages price the SAME EconomicsView.Scenario, so one set of knob markup and one save-scenario door (POST /fleet/economics/scenarios, which always redirects to /fleet/economics regardless of which page submitted it — see handleEconomicsScenarioSave) serves both. Takes the whole page `.` — reads .Economics.Scenario and .CSRF, exactly as when this was inline in "economics". */}} {{define "econ_knob_drawer"}}
Pricing knobs

Rate card — boxes

{{range $boxKey, $spec := .Economics.Scenario.RateCard.Boxes}} {{end}}
Box$/hourCoresMem GBEBS GB
{{if eq $boxKey ""}}default{{else}}{{$boxKey}}{{end}}

Rate card — storage & transfer

Overheads

{{range $i, $li := .Economics.Scenario.RateCard.Overheads}} {{end}}
Line item$/month
{{$li.Name}}

Allocation

Mode & margin

{{marginMultiple .Economics.Scenario.Margin}}

Rate sheet

{{/* economics-v2 (Task 6): fleet box + mem-overage rate-sheet knobs — the same three RateSheet fields compute.go's PriceAccount reads under fleetRevenue and the rate-sheet mem-overage term, both modes. */}}

Fleet volume break

Fleet pool

Free tier

Save as scenario

With JavaScript on, this saves the knobs above exactly as tweaked. With it off, this round-trips the currently active scenario unchanged, under a new name and/or activated. Saving from either page lands back on the dashboard (/fleet/economics) — the one save door both pages share.

{{/* Hidden by default; the inline script shows it (display:"") exactly when every "counts as CARLOS" checkbox is unchecked — the state the save field refuses to persist (see the template comment by the bill table). Only /fleet/economics ever has bill checkboxes on screen, so this note only ever becomes visible there — but the element must exist on both pages: setBillServicesZeroNote (econ_maths_js) looks it up by id and simply no-ops via its `if (el)` guard when absent. */}}
{{end}} {{/* econ_maths_js: every pure (no page-specific DOM target) function the knob-recompute scripts need — economics.AllocateBox/PriceAccount transliterated, plus the small DOM/formatting helpers and readScenarioFromDOM, which reads the econ_knob_drawer inputs back into a live-edited Scenario. Emits BARE JavaScript, no