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) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-21 14:42:49 -05:00
parent 2da9fe0373
commit 5c9915d175
2 changed files with 5 additions and 5 deletions

View File

@@ -175,9 +175,9 @@ export function FleetDashboard() {
isFetching: fleetFetching, isFetching: fleetFetching,
dataUpdatedAt, dataUpdatedAt,
} = useQuery({ } = useQuery({
queryKey: ['fleet-summary', isSuperAdmin ? 'all' : tenantId], queryKey: ['fleet-summary', isSuperAdmin && !selectedTenantId ? 'all' : tenantId],
queryFn: () => queryFn: () =>
isSuperAdmin isSuperAdmin && !selectedTenantId
? metricsApi.fleetSummaryAll() ? metricsApi.fleetSummaryAll()
: metricsApi.fleetSummary(tenantId), : metricsApi.fleetSummary(tenantId),
// Disable polling when SSE is connected (events update cache directly) // Disable polling when SSE is connected (events update cache directly)

View File

@@ -26,17 +26,17 @@ const VPN_TYPE_CONFIG = {
wireguard: { wireguard: {
icon: Shield, icon: Shield,
label: 'WireGuard', label: 'WireGuard',
color: '#a855f7', // purple color: 'hsl(var(--accent))',
}, },
ipsec: { ipsec: {
icon: Lock, icon: Lock,
label: 'IPsec', label: 'IPsec',
color: '#3b82f6', // blue color: 'hsl(var(--info))',
}, },
l2tp: { l2tp: {
icon: Globe, icon: Globe,
label: 'L2TP', label: 'L2TP',
color: '#22c55e', // green color: 'hsl(var(--success))',
}, },
} as const } as const