Disable reservations; subnet enable/disable buttons; page-head CSS fix
release / release (push) Successful in 5m53s

- A disabled reservation is kept but ignored: the client gets a pool
  address like any other (steward reservation disable|enable, buttons and
  a checkbox in the web UI). Schema migration 3.
- Subnets get Disable/Enable buttons on their page and in the list.
- A rule left without its selector in style.css broke the page heading's
  layout, so the New ... buttons sat cramped under the description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
abrown38andClaude Opus 5.5 committed 2026-10-14 16:02:15 +01:00
1 parent 7b3f0f764c
commit 6ad1bb9a0d
21 files changed
+165 -37

No files matched your search

+16
View File
@@ -98,6 +98,22 @@ func TestProblems(t *testing.T) {
}
}
func TestDisabledReservationsDontConflict(t *testing.T) {
st := good()
st.Subnets[1].Pools = []model.Pool{pool("10.0.20.100-10.0.20.200")}
st.Reservations[0].Disabled = true
// The same client and address again, enabled: fine while the first is
// disabled.
st.Reservations = append(st.Reservations, &model.Reservation{ID: 9, MAC: "aa:bb:cc:dd:ee:01", IP: netip.MustParseAddr("10.0.10.20")})
if ps := Check(st, nil); len(ps) != 0 {
t.Errorf("problems: %v", ps)
}
st.Reservations[0].Disabled = false
if got := codes(Check(st, nil)); !strings.Contains(got, "reservation_ip_taken") {
t.Errorf("enabling it again: %q", got)
}
}
func TestSameMACInTwoSubnets(t *testing.T) {
st := good()
st.Subnets[1].Pools = []model.Pool{pool("10.0.20.100-10.0.20.200")}