From c44ea3943e7d12b006b72ab52ed9aa1dd7017371 Mon Sep 17 00:00:00 2001 From: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com> Date: Thu, 22 May 2025 08:58:25 +0200 Subject: [PATCH] feat: resources in finding tables (#7813) --- ui/CHANGELOG.md | 6 +-- ui/app/(prowler)/findings/page.tsx | 1 - .../findings/table/column-findings.tsx | 28 +++++++++-- .../table/column-new-findings-to-date.tsx | 29 ++++++++++-- .../providers/table/column-providers.tsx | 4 +- .../ui/entities/entity-info-short.tsx | 8 ++-- ui/components/ui/entities/index.ts | 3 +- ui/components/ui/entities/snippet-chip.tsx | 47 +++++++++++++++++++ ui/components/ui/entities/snippet-id.tsx | 39 --------------- ui/components/ui/entities/snippet-label.tsx | 32 ------------- .../users/profile/user-basic-info-card.tsx | 36 ++------------ 11 files changed, 111 insertions(+), 122 deletions(-) create mode 100644 ui/components/ui/entities/snippet-chip.tsx delete mode 100644 ui/components/ui/entities/snippet-id.tsx delete mode 100644 ui/components/ui/entities/snippet-label.tsx diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index 595d678296..f56f24cec8 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to the **Prowler UI** are documented in this file. ### 🚀 Added - New profile page with details about the user and their roles. [(#7780)](https://github.com/prowler-cloud/prowler/pull/7780) +- Improved `SnippetChip` component and show resource name in new findings table. [(#7813)](https://github.com/prowler-cloud/prowler/pull/7813) --- @@ -22,14 +23,13 @@ All notable changes to the **Prowler UI** are documented in this file. ## [v1.7.0] (Prowler v5.7.0) - ### 🚀 Added - Add a new chart to show the split between passed and failed findings. [(#7680)](https://github.com/prowler-cloud/prowler/pull/7680) - Added `Accordion` component. [(#7700)](https://github.com/prowler-cloud/prowler/pull/7700) - Improve `Provider UID` filter by adding more context and enhancing the UI/UX. [(#7741)](https://github.com/prowler-cloud/prowler/pull/7741) - Added an AWS CloudFormation Quick Link to the IAM Role credentials step [(#7735)](https://github.com/prowler-cloud/prowler/pull/7735) -– Use `getLatestFindings` on findings page when no scan or date filters are applied. [(#7756)](https://github.com/prowler-cloud/prowler/pull/7756) + – Use `getLatestFindings` on findings page when no scan or date filters are applied. [(#7756)](https://github.com/prowler-cloud/prowler/pull/7756) ### 🐞 Fixes @@ -102,7 +102,7 @@ All notable changes to the **Prowler UI** are documented in this file. - Revalidate the page when a role is deleted. [(#6976)](https://github.com/prowler-cloud/prowler/pull/6976) - Allows removing group visibility when creating a role. [(#7088)](https://github.com/prowler-cloud/prowler/pull/7088) - Displays correct error messages when deleting a user. [(#7089)](https://github.com/prowler-cloud/prowler/pull/7089) -- Updated label: *"Select a scan job"* → *"Select a cloud provider"*. [(#7107)](https://github.com/prowler-cloud/prowler/pull/7107) +- Updated label: _"Select a scan job"_ → _"Select a cloud provider"_. [(#7107)](https://github.com/prowler-cloud/prowler/pull/7107) - Display uid if alias is missing when creating a group. [(#7137)](https://github.com/prowler-cloud/prowler/pull/7137) --- diff --git a/ui/app/(prowler)/findings/page.tsx b/ui/app/(prowler)/findings/page.tsx index f137b451cc..f1c5fac71f 100644 --- a/ui/app/(prowler)/findings/page.tsx +++ b/ui/app/(prowler)/findings/page.tsx @@ -52,7 +52,6 @@ export default async function Findings({ const uniqueServices = metadataInfoData?.data?.attributes?.services || []; const uniqueResourceTypes = metadataInfoData?.data?.attributes?.resource_types || []; - // Get findings data // Extract provider UIDs const providerUIDs: string[] = Array.from( diff --git a/ui/components/findings/table/column-findings.tsx b/ui/components/findings/table/column-findings.tsx index 8bfeac0a7f..a8636ab750 100644 --- a/ui/components/findings/table/column-findings.tsx +++ b/ui/components/findings/table/column-findings.tsx @@ -1,11 +1,16 @@ "use client"; import { ColumnDef } from "@tanstack/react-table"; +import { Database } from "lucide-react"; import { useSearchParams } from "next/navigation"; import { DataTableRowDetails } from "@/components/findings/table"; import { InfoIcon } from "@/components/icons"; -import { DateWithTime, EntityInfoShort } from "@/components/ui/entities"; +import { + DateWithTime, + EntityInfoShort, + SnippetChip, +} from "@/components/ui/entities"; import { TriggerSheet } from "@/components/ui/sheet"; import { DataTableColumnHeader, @@ -63,7 +68,7 @@ const FindingDetailsCell = ({ row }: { row: any }) => { }; return ( -
{checktitle}
@@ -119,6 +126,21 @@ export const ColumnFindings: ColumnDef
{checktitle}
@@ -95,6 +101,21 @@ export const ColumnNewFindingsToDate: ColumnDef
-
- {label}
-
Active organization ID: