Skip to content

fix: add HAProxy plugin to sidebar navigation - #9

Merged
sarg3nt merged 5 commits into
mainfrom
fix/haproxy-sidebar-nav
Feb 1, 2026
Merged

fix: add HAProxy plugin to sidebar navigation#9
sarg3nt merged 5 commits into
mainfrom
fix/haproxy-sidebar-nav

Conversation

@sarg3nt

@sarg3nt sarg3nt commented Feb 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added SidebarIconHAProxy templ component to the sidebar icon definitions
  • Added case "haproxy" to the renderIntegrationLink switch statement so HAProxy appears in the draggable sidebar when enabled
  • Added HAProxy to the fallback section in OrderedIntegrationLinks for backwards compatibility
  • The HAProxy plugin already has a predefined "HAProxy Overview" dashboard that deploys when the plugin is enabled — no dashboard changes needed

Closes #8

Test plan

  • Enable HAProxy plugin via Settings > Plugins
  • Verify "HAProxy" appears in the left sidebar navigation
  • Verify clicking "HAProxy" navigates to /haproxy
  • Verify the HAProxy Overview dashboard is accessible
  • Verify sidebar order is preserved when dragging/reordering plugins
  • Verify disabling HAProxy removes it from sidebar

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings February 1, 2026 22:42
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

sarg3nt and others added 2 commits February 1, 2026 14:57
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>
Copilot AI review requested due to automatic review settings February 1, 2026 23:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

…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>
@sarg3nt
sarg3nt merged commit 10c70c9 into main Feb 1, 2026
17 checks passed
@sarg3nt
sarg3nt deleted the fix/haproxy-sidebar-nav branch May 12, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HAProxy plugin not appearing in sidebar nav when enabled

2 participants