From 5c9915d17563c4914da86d1635cd4a005684d258 Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Sat, 21 Mar 2026 14:42:49 -0500 Subject: [PATCH] fix(ui): Needs Attention updates on tenant switch, VPN colors tokenized - Dashboard fleet query now uses selected tenant ID for super_admin instead of always fetching all tenants. Needs Attention, metrics strip, and all widgets update when switching tenants. - VPN tab: replace hardcoded purple/blue/green hex with token colors - Add Certificates and VPN back to sidebar low-frequency section Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/fleet/FleetDashboard.tsx | 4 ++-- frontend/src/components/network/VpnTab.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/fleet/FleetDashboard.tsx b/frontend/src/components/fleet/FleetDashboard.tsx index e8ffd0b..30f56fa 100644 --- a/frontend/src/components/fleet/FleetDashboard.tsx +++ b/frontend/src/components/fleet/FleetDashboard.tsx @@ -175,9 +175,9 @@ export function FleetDashboard() { isFetching: fleetFetching, dataUpdatedAt, } = useQuery({ - queryKey: ['fleet-summary', isSuperAdmin ? 'all' : tenantId], + queryKey: ['fleet-summary', isSuperAdmin && !selectedTenantId ? 'all' : tenantId], queryFn: () => - isSuperAdmin + isSuperAdmin && !selectedTenantId ? metricsApi.fleetSummaryAll() : metricsApi.fleetSummary(tenantId), // Disable polling when SSE is connected (events update cache directly) diff --git a/frontend/src/components/network/VpnTab.tsx b/frontend/src/components/network/VpnTab.tsx index f51baac..2ef43cf 100644 --- a/frontend/src/components/network/VpnTab.tsx +++ b/frontend/src/components/network/VpnTab.tsx @@ -26,17 +26,17 @@ const VPN_TYPE_CONFIG = { wireguard: { icon: Shield, label: 'WireGuard', - color: '#a855f7', // purple + color: 'hsl(var(--accent))', }, ipsec: { icon: Lock, label: 'IPsec', - color: '#3b82f6', // blue + color: 'hsl(var(--info))', }, l2tp: { icon: Globe, label: 'L2TP', - color: '#22c55e', // green + color: 'hsl(var(--success))', }, } as const