Skip to content

Implement multi-pane load balancer detail view with CRUD operations#96

Merged
larkly merged 5 commits intomainfrom
feat/lb-detail-view
Mar 30, 2026
Merged

Implement multi-pane load balancer detail view with CRUD operations#96
larkly merged 5 commits intomainfrom
feat/lb-detail-view

Conversation

@larkly
Copy link
Copy Markdown
Owner

@larkly larkly commented Mar 29, 2026

Summary

  • Context-sensitive Create (Ctrl+N) and Delete (Ctrl+D) for listeners, pools, and members from the detail view
  • Edit (Enter) for all sub-resources: LB name/desc, listener name, pool name/method, member name/weight
  • Create Load Balancer from list view (Ctrl+N) with inline subnet picker
  • 13 new API functions in the loadbalancer package (Create/Update/Delete for LB, listeners, pools, members, health monitors)
  • 4 new modal form packages: lbcreate, lblistenercreate, lbpoolcreate, lbmembercreate — each supports both create and edit modes
  • Pool creation supports atomic health monitor attachment (HTTP/HTTPS/TCP/PING)

Review findings

Audited by 5-agent review team (security, UX, user, product, admin). All bugs found during review are fixed in this PR. Remaining findings tracked in #97.

Test plan

  • LB list: Ctrl+N opens create form with subnet picker, submit creates LB
  • LB detail Info pane: Enter opens edit form for name/description
  • Listeners pane: Ctrl+N adds listener, Enter edits name, Ctrl+D deletes
  • Pools pane: Ctrl+N adds pool with optional health monitor, Enter edits name/method, Ctrl+D deletes
  • Members pane: Ctrl+N adds member, Enter edits name/weight, Ctrl+D deletes
  • Edit forms hide non-updatable fields (protocol, port, address)
  • Edit mode focus navigation skips hidden fields correctly
  • Health monitor validation rejects invalid delay/timeout/retries with error messages
  • Empty name validation on all create/edit forms
  • Esc cancels any form without changes
  • Action bar shows context-sensitive buttons per pane

larkly added 2 commits March 29, 2026 22:18
Add context-sensitive create and delete for all LB sub-resources,
driven by the focused pane in the detail view:

- Listeners pane: Ctrl+N to add listener (name, protocol, port),
  Ctrl+D to delete selected listener
- Pools pane: Ctrl+N to add pool with optional health monitor
  (HTTP/HTTPS/TCP/PING with URL path, expected codes, timing),
  Ctrl+D to delete selected pool
- Members pane: Ctrl+N to add member (address, port, weight),
  Ctrl+D to delete selected member

Add 8 API functions to loadbalancer package: CreateListener,
DeleteListener, CreatePool, DeletePool, CreateMember, DeleteMember,
CreateHealthMonitor, DeleteHealthMonitor. Pool creation supports
atomic health monitor attachment via gophercloud inline opts.

Export FocusPane type and pane constants from lbdetail for app-layer
key binding dispatch. Add Selected*() accessor methods for each pane.
Action bar updates dynamically based on focused pane and selection.
Add Create Load Balancer from the list view (Ctrl+N) with a subnet
picker that fetches available subnets and allows inline selection.
Supports both create and edit modes — edit shows only name/description.

Add Edit (Enter key) for all sub-resources in the detail view:
- Info pane: edit LB name and description
- Listeners pane: edit listener name
- Pools pane: edit pool name and LB method
- Members pane: edit member name and weight

Each existing create form gains a NewEdit constructor that pre-fills
current values, hides non-updatable fields (protocol, port, address),
and calls the corresponding Update API on submit.

Add 5 API functions: CreateLoadBalancer, UpdateLoadBalancer,
UpdateListener, UpdatePool, UpdateMember. Add LB(), SelectedListener(),
SelectedPool(), SelectedMember() accessors to lbdetail for pre-filling
edit forms. Action bar now shows context-sensitive "enter Edit" buttons.
@larkly larkly force-pushed the feat/lb-detail-view branch from 8810988 to 31d8507 Compare March 29, 2026 20:18
larkly added 2 commits March 30, 2026 00:38
- Fix stale pool ID bug in delete member: encode poolID|memberID in
  confirm action at creation time, split at execution time
- Remove inconsistent focus guards from SelectedListenerID and
  SelectedMemberID — callers already enforce via FocusedPane()
- Add name validation to all create/edit submit methods
- Fix spinner text to show "Updating" in edit mode for listener
  and member forms
- Replace raw focusField++ with advanceFocus(1) in listener Enter
  handler to correctly skip fields in edit mode
- Remove unused SelectedPoolForMember alias (identical to SelectedPoolID)
- Remove unused CreateHealthMonitor/DeleteHealthMonitor functions
  (pool creation uses inline monitor opts)
- Remove unused focused param from renderPicker
Fix focus navigation in lbmembercreate non-text-input handler: replace
raw modulo with advanceFocus() so edit mode correctly skips address/port
fields. Without this, Tab from submit/cancel lands on hidden fields.

Replace silent health monitor default values with explicit validation.
Previously, entering "abc" for delay would silently become 5. Now shows
clear error messages: "Delay must be a positive number (seconds)".
Empty fields still use sensible defaults (5s/3s/3 retries).

Both issues identified by multi-perspective agent review team.
Add SOURCE_IP_PORT to pool LB method options — required for OVN
networks where standard SOURCE_IP is not supported.

Expand listener edit form beyond name-only: now supports editing
description and connection limit. Add Description and ConnLimit
fields to Listener struct. Update UpdateListener API to pass all
three updatable fields to gophercloud.
@larkly larkly merged commit 64f24cf into main Mar 30, 2026
3 checks passed
@larkly larkly deleted the feat/lb-detail-view branch March 30, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant