diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index 67dcc83a39..9f7f977a2d 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -11,6 +11,10 @@ All notable changes to the **Prowler UI** are documented in this file. - Providers page redesigned with cloud organization hierarchy, HeroUI-to-shadcn migration, organization and account group filters, and row selection for bulk actions [(#10292)](https://github.com/prowler-cloud/prowler/pull/10292) - AWS Organizations onboarding now uses a clearer 3-step flow: deploy the ProwlerScan role in the management account via CloudFormation Stack, deploy to member accounts via StackSet with a copyable template URL, and confirm with the Role ARN [(#10274)](https://github.com/prowler-cloud/prowler/pull/10274) +### 🐞 Fixed + +- Finding detail drawer crashing when resource, scan, or provider relationships are missing from the API response [(#10314)](https://github.com/prowler-cloud/prowler/pull/10314) + ### 🔐 Security - npm transitive dependencies patched to resolve 11 Dependabot alerts (6 HIGH, 4 MEDIUM, 1 LOW): hono, @hono/node-server, fast-xml-parser, serialize-javascript, minimatch [(#10267)](https://github.com/prowler-cloud/prowler/pull/10267) diff --git a/ui/components/findings/table/column-findings.tsx b/ui/components/findings/table/column-findings.tsx index 486a0505df..ea2c8ae464 100644 --- a/ui/components/findings/table/column-findings.tsx +++ b/ui/components/findings/table/column-findings.tsx @@ -33,20 +33,14 @@ const getResourceData = ( row: { original: FindingProps }, field: keyof FindingProps["relationships"]["resource"]["attributes"], ) => { - return ( - row.original.relationships?.resource?.attributes?.[field] || - `No ${field} found in resource` - ); + return row.original.relationships?.resource?.attributes?.[field] || "-"; }; const getProviderData = ( row: { original: FindingProps }, field: keyof FindingProps["relationships"]["provider"]["attributes"], ) => { - return ( - row.original.relationships?.provider?.attributes?.[field] || - `No ${field} found in provider` - ); + return row.original.relationships?.provider?.attributes?.[field] || "-"; }; // Component for finding title that opens the detail drawer @@ -186,6 +180,10 @@ export function getColumnFindings( cell: ({ row }) => { const resourceName = getResourceData(row, "name"); + if (resourceName === "-") { + return
-
; + } + return (- Here is an overview of this finding: -
- {/* General Tab */}+ Here is an overview of this finding: +
+ Resource information is not available. +
+ )}+ Scan information is not available. +
+ )}