Implement multi-pane load balancer detail view with CRUD operations#96
Merged
Implement multi-pane load balancer detail view with CRUD operations#96
Conversation
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.
8810988 to
31d8507
Compare
- 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.
29 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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