From b4c9ca36a93591471e23b57612acede06eafa818 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 25 Sep 2025 18:07:01 +0200 Subject: [PATCH] fix keysAndTags for info Signed-off-by: Andrei Kvapil --- internal/controller/dashboard/sidebar.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/controller/dashboard/sidebar.go b/internal/controller/dashboard/sidebar.go index 8ec4ef25..a8877c12 100644 --- a/internal/controller/dashboard/sidebar.go +++ b/internal/controller/dashboard/sidebar.go @@ -74,8 +74,13 @@ func (m *Manager) ensureSidebar(ctx context.Context, crd *cozyv1alpha1.Cozystack // Check if this resource is a module if def.Spec.Dashboard.Module { - // Add to modules sidebar list - moduleSidebars = append(moduleSidebars, fmt.Sprintf("%s-sidebar", lowerKind)) + // Special case: info should have its own keysAndTags, not be in modules + if lowerKind == "info" { + keysAndTags[plural] = []any{fmt.Sprintf("%s-sidebar", lowerKind)} + } else { + // Add to modules sidebar list + moduleSidebars = append(moduleSidebars, fmt.Sprintf("%s-sidebar", lowerKind)) + } } else { // Add to keysAndTags for non-module resources keysAndTags[plural] = []any{fmt.Sprintf("%s-sidebar", lowerKind)}