From 717d9565939380475bd27aafd9d5bc1af44f90af Mon Sep 17 00:00:00 2001 From: SaelixCode Date: Fri, 3 Jul 2026 19:27:18 -0400 Subject: [PATCH] fix: replace native title tooltips with Radix tooltips on Resources page Converted all actionable button tooltips (Open stack, Inspect image, Scan, Browse volume, and delete buttons) plus the SenchoBadge informational tooltip. Wrapped disabled protected-resource delete buttons in span triggers so tooltips fire on disabled elements. --- frontend/src/components/ResourcesView.tsx | 238 ++++++++++++++-------- 1 file changed, 152 insertions(+), 86 deletions(-) diff --git a/frontend/src/components/ResourcesView.tsx b/frontend/src/components/ResourcesView.tsx index 6e5dde6b..961ac75c 100644 --- a/frontend/src/components/ResourcesView.tsx +++ b/frontend/src/components/ResourcesView.tsx @@ -13,6 +13,7 @@ import { ScrollArea } from "@/components/ui/scroll-area"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import { apiFetch } from '@/lib/api'; import { toast } from '@/components/ui/toast-store'; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { Trash2, HardDrive, Network, PackageMinus, MonitorX, MoreVertical, AlertTriangle, ShieldCheck, Plus, Eye, Loader2, History, FolderOpen } from 'lucide-react'; import { SeverityBadge } from '@/components/ui/SeverityBadge'; import { useTrivyStatus } from '@/hooks/useTrivyStatus'; @@ -183,9 +184,16 @@ function ManagedBadge({ status, managedBy, onOpenStack }: { const inner = (<>{managedBy}); if (onOpenStack && managedBy) { return ( - + + + + + + Open stack {managedBy} + + ); } return {inner}; @@ -213,13 +221,17 @@ function ManagedBadge({ status, managedBy, onOpenStack }: { function SenchoBadge() { return ( - - - Sencho - + + + + + + Sencho + + + Protected · running Sencho instance + + ); } @@ -860,21 +872,27 @@ export default function ResourcesView({ headerActions }: ResourcesViewProps = {} }} /> {trivy.available && ( - + + + + + + View completed vulnerability scans and compare them + + )} @@ -917,33 +935,45 @@ export default function ResourcesView({ headerActions }: ResourcesViewProps = {}
- - {trivy.available && isAdmin && img.RepoTags?.[0] && img.RepoTags[0] !== ':' && ( - - + + + - + + Inspect image + + + {trivy.available && isAdmin && img.RepoTags?.[0] && img.RepoTags[0] !== ':' && ( + + + + + + + + + Scan for vulnerabilities + + handleScanImage(img.RepoTags![0], { scanners: ['vuln'] })} @@ -958,16 +988,26 @@ export default function ResourcesView({ headerActions }: ResourcesViewProps = {} )} - {isAdmin && } + {isAdmin && ( + + + + + + + + {img.isSencho && Protected · running Sencho instance} + + + )}
@@ -1020,27 +1060,43 @@ export default function ResourcesView({ headerActions }: ResourcesViewProps = {}
{isAdmin && ( - + + + + + + Browse volume contents + + + )} + {isAdmin && ( + + + + + + + + {vol.isSencho && Protected · running Sencho instance} + + )} - {isAdmin && }
@@ -1173,16 +1229,26 @@ export default function ResourcesView({ headerActions }: ResourcesViewProps = {} > {inspectLoadingId === net.Id ? : } - {isAdmin && } + {isAdmin && ( + + + + + + + + {net.isSencho && Protected · running Sencho instance} + + + )}