From 47d74a7742fdb412ee4c42398414b8ee40ec8f9a Mon Sep 17 00:00:00 2001 From: Pablo Lara Date: Wed, 20 Nov 2024 15:45:32 +0100 Subject: [PATCH] fix: fix typo error --- app/(prowler)/compliance/page.tsx | 18 ++++++++++++------ ....tsx => custom-checkbox-muted-findings.tsx} | 0 components/filters/index.ts | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) rename components/filters/{custo-checkbox-muted-findings.tsx => custom-checkbox-muted-findings.tsx} (100%) diff --git a/app/(prowler)/compliance/page.tsx b/app/(prowler)/compliance/page.tsx index af2652cc66..38c9800467 100644 --- a/app/(prowler)/compliance/page.tsx +++ b/app/(prowler)/compliance/page.tsx @@ -17,12 +17,18 @@ export default async function Compliance({ searchParams: SearchParamsProps; }) { const scansData = await getScans({}); - const scanList = scansData?.data.map((scan: any) => ({ - id: scan.id, - name: scan.attributes.name || "Unnamed Scan", - state: scan.attributes.state, - progress: scan.attributes.progress, - })); + const scanList = scansData?.data + .filter( + (scan: any) => + scan.attributes.state === "completed" && + scan.attributes.progress === 100, + ) + .map((scan: any) => ({ + id: scan.id, + name: scan.attributes.name || "Unnamed Scan", + state: scan.attributes.state, + progress: scan.attributes.progress, + })); const selectedScanId = searchParams.scanId || scanList[0]?.id; diff --git a/components/filters/custo-checkbox-muted-findings.tsx b/components/filters/custom-checkbox-muted-findings.tsx similarity index 100% rename from components/filters/custo-checkbox-muted-findings.tsx rename to components/filters/custom-checkbox-muted-findings.tsx diff --git a/components/filters/index.ts b/components/filters/index.ts index fb712b3168..915bbd3aec 100644 --- a/components/filters/index.ts +++ b/components/filters/index.ts @@ -1,5 +1,5 @@ -export * from "./custo-checkbox-muted-findings"; export * from "./custom-account-selection"; +export * from "./custom-checkbox-muted-findings"; export * from "./custom-date-picker"; export * from "./custom-provider-inputs"; export * from "./custom-region-selection";