Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gearbox/cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
_ "github.com/sarg3nt/gearbox/internal/plugins/alerts"
_ "github.com/sarg3nt/gearbox/internal/plugins/certificates"
dashboardPlugin "github.com/sarg3nt/gearbox/internal/plugins/dashboard"
_ "github.com/sarg3nt/gearbox/internal/plugins/haproxy"
_ "github.com/sarg3nt/gearbox/internal/plugins/logs"
_ "github.com/sarg3nt/gearbox/internal/plugins/metrics"
_ "github.com/sarg3nt/gearbox/internal/plugins/services"
Expand Down
11 changes: 11 additions & 0 deletions gearbox/internal/framework/templates/layouts/base.templ
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,12 @@ templ SidebarIconOSUpdates() {
</svg>
}

templ SidebarIconHAProxy() {
<svg class="w-6 h-6 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path>
</svg>
}

templ SidebarLinkWithBadge(href string, label string, icon templ.Component, currentPath string, badgeID string) {
<li>
if isActivePath(href, currentPath) {
Expand Down Expand Up @@ -1655,6 +1661,9 @@ templ OrderedIntegrationLinks(currentPath string) {
// If integrations list is empty (no server configured), show nothing
} else {
// Fallback to default order only if context doesn't exist at all (backwards compatibility)
if canViewIntegration(ctx, "haproxy") {
@SidebarLinkWithIntegration("/haproxy", "HAProxy", SidebarIconHAProxy(), currentPath, "haproxy")
}
if canViewIntegration(ctx, "metrics") {
@SidebarLinkWithIntegration("/history", "Metrics", SidebarIconMetrics(), currentPath, "metrics")
}
Expand Down Expand Up @@ -1682,6 +1691,8 @@ templ OrderedIntegrationLinks(currentPath string) {
// renderIntegrationLink renders a single integration link based on the integration name.
templ renderIntegrationLink(name string, currentPath string) {
switch name {
case "haproxy":
@SidebarLinkDraggable("/haproxy", "HAProxy", SidebarIconHAProxy(), currentPath, "haproxy")
case "metrics":
@SidebarLinkDraggable("/history", "Metrics", SidebarIconMetrics(), currentPath, "metrics")
case "logs":
Expand Down