diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index c9a5e56a5e..278901731d 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -19,6 +19,9 @@ All notable changes to the **Prowler UI** are documented in this file. ## [v1.8.1] (Prowler 5.8.1) +### 🔄 Changed +- Latest new failed findings now use `GET /findings/latest` [(#8219)](https://github.com/prowler-cloud/prowler/pull/8219) + ### Removed - Validation of the provider's secret type during updates [(#8197)](https://github.com/prowler-cloud/prowler/pull/8197) diff --git a/ui/app/(prowler)/page.tsx b/ui/app/(prowler)/page.tsx index 7c6f2ac906..cd6bc49c96 100644 --- a/ui/app/(prowler)/page.tsx +++ b/ui/app/(prowler)/page.tsx @@ -1,8 +1,7 @@ import { Spacer } from "@nextui-org/react"; -import { format, subDays } from "date-fns"; import { Suspense } from "react"; -import { getFindings } from "@/actions/findings/findings"; +import { getLatestFindings } from "@/actions/findings/findings"; import { getFindingsBySeverity, getFindingsByStatus, @@ -129,15 +128,12 @@ const SSRDataNewFindingsTable = async () => { const page = 1; const sort = "severity,-inserted_at"; - const twoDaysAgo = format(subDays(new Date(), 2), "yyyy-MM-dd"); - const defaultFilters = { - "filter[status__in]": "FAIL", - "filter[delta__in]": "new", - "filter[inserted_at__gte]": twoDaysAgo, + "filter[status]": "FAIL", + "filter[delta]": "new", }; - const findingsData = await getFindings({ + const findingsData = await getLatestFindings({ query: undefined, page, sort, @@ -178,8 +174,7 @@ const SSRDataNewFindingsTable = async () => { Latest new failing findings

- Showing the latest 10 new failing findings by severity from the last - 2 days. + Showing the latest 10 new failing findings by severity.