Pools: single Save handles both metadata and prefixes
Summary
- The Pools settings page had two separate buttons per row — Save (description/hidden) and Save Prefixes (ipv4/ipv6 prefix) — hitting two different endpoints. Merged into a single Save that persists both in one POST.
- Extracted the field-presence-aware pool range upsert logic into
applyPoolRangeForm, shared by the Proxmox page's VMID-only form, the standalone/settings/pool-ranges/{env}/{pool}/updateendpoint, and this combined Pools save.
Test plan
-
go build ./... -
go test ./internal/web/...(includes two new tests: combined save persists both metadata+prefixes, and prefix-not-in-NetBox still rejects with 400) -
go test ./...