From 04952673514f9b5e480c9ce0259dca595f842a59 Mon Sep 17 00:00:00 2001 From: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com> Date: Fri, 12 Dec 2025 13:12:17 +0100 Subject: [PATCH] feat: resource details added to findigns and resource view (#9515) --- ui/CHANGELOG.md | 12 +++++ ui/app/(prowler)/resources/page.tsx | 3 ++ .../findings/table/finding-detail.tsx | 9 ++++ .../resources/table/resource-detail.tsx | 52 +++++++++++++++++++ ui/types/components.ts | 2 + ui/types/resources.ts | 3 ++ 6 files changed, 81 insertions(+) diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index 3faf3f4697..137d506bbf 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to the **Prowler UI** are documented in this file. +## [1.16.0] (Prowler Unreleased) + +### 🚀 Added + +- More extensive resource details (partition, details and metadata) within Findings detail and Resources detail view [(#9515)](https://github.com/prowler-cloud/prowler/pull/9515) + +### 🔄 Changed + +### 🐞 Fixed + +--- + ## [1.15.0] (Prowler v5.15.0) ### 🚀 Added diff --git a/ui/app/(prowler)/resources/page.tsx b/ui/app/(prowler)/resources/page.tsx index 6ecdf707f1..e0d9e1ceec 100644 --- a/ui/app/(prowler)/resources/page.tsx +++ b/ui/app/(prowler)/resources/page.tsx @@ -115,6 +115,9 @@ const SSRDataTable = async ({ "inserted_at", "updated_at", "uid", + "partition", + "details", + "metadata", ], }); diff --git a/ui/components/findings/table/finding-detail.tsx b/ui/components/findings/table/finding-detail.tsx index 203a6c58aa..28a72fbe8c 100644 --- a/ui/components/findings/table/finding-detail.tsx +++ b/ui/components/findings/table/finding-detail.tsx @@ -307,6 +307,15 @@ export const FindingDetail = ({ {renderValue(resource.region)} +
+ + {renderValue(resource.partition)} + + + {renderValue(resource.details)} + +
+ {resource.tags && Object.entries(resource.tags).length > 0 && (

diff --git a/ui/components/resources/table/resource-detail.tsx b/ui/components/resources/table/resource-detail.tsx index da32c6b972..6c37f64dc3 100644 --- a/ui/components/resources/table/resource-detail.tsx +++ b/ui/components/resources/table/resource-detail.tsx @@ -51,6 +51,27 @@ const renderValue = (value: string | null | undefined) => { return value && value.trim() !== "" ? value : "-"; }; +const parseMetadata = ( + metadata: Record | string | null | undefined, +): Record | null => { + if (!metadata) return null; + + if (typeof metadata === "string") { + try { + const parsed = JSON.parse(metadata); + return typeof parsed === "object" && parsed !== null ? parsed : null; + } catch { + return null; + } + } + + if (typeof metadata === "object" && metadata !== null) { + return metadata as Record; + } + + return null; +}; + const buildCustomBreadcrumbs = ( _resourceName: string, findingTitle?: string, @@ -287,6 +308,14 @@ export const ResourceDetail = ({ {renderValue(attributes.region)}

+
+ + {renderValue(attributes.partition)} + + + {renderValue(attributes.details)} + +
@@ -296,6 +325,29 @@ export const ResourceDetail = ({
+ {(() => { + const parsedMetadata = parseMetadata(attributes.metadata); + return parsedMetadata && + Object.entries(parsedMetadata).length > 0 ? ( + +
+ + {JSON.stringify(parsedMetadata, null, 2)} + +
+                    {JSON.stringify(parsedMetadata, null, 2)}
+                  
+
+
+ ) : null; + })()} + {resourceTags && Object.entries(resourceTags).length > 0 ? (

diff --git a/ui/types/components.ts b/ui/types/components.ts index 539e01a02b..07c98ab92e 100644 --- a/ui/types/components.ts +++ b/ui/types/components.ts @@ -573,6 +573,8 @@ export interface FindingProps { type: string; inserted_at: string; updated_at: string; + details: string | null; + partition: string | null; }; relationships: { provider: { diff --git a/ui/types/resources.ts b/ui/types/resources.ts index 487e749168..8863037108 100644 --- a/ui/types/resources.ts +++ b/ui/types/resources.ts @@ -11,6 +11,9 @@ export interface ResourceProps { tags: Record; type: string; failed_findings_count: number; + details: string | null; + partition: string | null; + metadata: Record | null; }; relationships: { provider: {