fix: add HAProxy plugin to sidebar navigation - #9
Merged
Conversation
The HAProxy plugin was fully implemented (registration, routes, sidebar config, predefined dashboard) but missing from the hardcoded template switch statement that renders sidebar links. Added SidebarIconHAProxy component and HAProxy case to both renderIntegrationLink and the fallback section in OrderedIntegrationLinks. Closes #8 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The HAProxy plugin was never imported in main.go, so its init() function never ran and it never registered with the plugin system. This caused GET /haproxy to return 404 even though the plugin code was fully implemented. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the missing HAProxy plugin entry in the sidebar navigation by adding the necessary template components and switch cases to make HAProxy appear when enabled.
Changes:
- Added
SidebarIconHAProxy()templ component with an appropriate grid/chip icon - Added HAProxy to the fallback integration order (for backwards compatibility when no custom order is stored)
- Added HAProxy case to
renderIntegrationLink()switch statement for proper draggable sidebar rendering
The dashboard plugin had its own copy of HAProxy widget definitions that main.go called directly. Now that the haproxy plugin is imported and registers those same widgets during Initialize(), the explicit call in main.go caused a "widget type already registered" conflict. Removed the dashboardPlugin.RegisterHAProxyWidgets() call and converted the dashboard import to a blank import. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Removed system-metrics, service-status, and certificate-warnings widget definitions from the HAProxy plugin (cross-plugin deps) - Removed system-metrics from predefined HAProxy Overview dashboard - Dashboard now only contains haproxy-status-summary and haproxy-backend-grid widgets - Fixed DashboardHandler.ViewDashboard to resolve default server ID at request time instead of using hardcoded empty string - Fixed widget Render to inject context serverID into config when box_id is empty, so HTMX endpoints get a valid server ID Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…eshes on toggle 1. Done button on plugin settings page now dynamically points to the first enabled plugin's page instead of hardcoded "/". Updated on page load and after each toggle via JS reading toggle states. 2. Sidebar nav auto-refreshes when toggling plugins on/off. Added /htmx/sidebar-nav endpoint that returns the sidebar HTML fragment. After successful toggle, JS fetches fresh sidebar HTML and swaps it into the DOM. 3. Added haproxy to integrationPath() mapping so firstEnabledIntegrationPath() resolves it correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
SidebarIconHAProxytempl component to the sidebar icon definitionscase "haproxy"to therenderIntegrationLinkswitch statement so HAProxy appears in the draggable sidebar when enabledOrderedIntegrationLinksfor backwards compatibilityCloses #8
Test plan
/haproxy🤖 Generated with Claude Code