Scale price preview dynamically with replica count #575

Merged
tobru merged 2 commits from replica-dynamic-pricing into main 2026-06-26 13:08:42 +00:00
Owner

The live price preview already reacted to storage size but never sent the real replica count: price-preview.js hardcoded replicas=1 and had no listener for spec.parameters.instances. The pricing engine was already replica-aware (compute, storage and managed RAM-sizing multiply per replica; the managed-service flat fee and CSP add-ons stay constant), so this only wires the frontend through the existing spec_field_ passthrough.

The live price preview already reacted to storage size but never sent the real replica count: price-preview.js hardcoded replicas=1 and had no listener for spec.parameters.instances. The pricing engine was already replica-aware (compute, storage and managed RAM-sizing multiply per replica; the managed-service flat fee and CSP add-ons stay constant), so this only wires the frontend through the existing spec_field_ passthrough.
tobru force-pushed replica-dynamic-pricing from 01860eb476
All checks were successful
Tests / test (push) Successful in 1m34s
to 946357a3fe
All checks were successful
Tests / test (push) Successful in 1m22s
2026-06-26 12:55:22 +00:00
Compare
Render choice config on non-enum fields as a dropdown
All checks were successful
Tests / test (push) Successful in 1m24s
ba1f8aa47c
A choice field_config on a field that isn't already a ChoiceField (e.g.
the integer spec.parameters.instances) only swapped field.choices, which
has no effect on an IntegerField's number-input widget, so the field kept
rendering as a number input.

Replace such fields with a TypedChoiceField so the configured options
render as a <select>, coercing values back to int for integer-backed
fields so the K8s spec receives an integer, not a string. Schema enum
fields keep their existing narrow-the-choices behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tobru merged commit bbeb92c77c into main 2026-06-26 13:08:42 +00:00
tobru deleted branch replica-dynamic-pricing 2026-06-26 13:08:42 +00:00
Sign in to join this conversation.
No description provided.