From 5d1abb3689ee047e91a583cb595b66d75cf9eb3b Mon Sep 17 00:00:00 2001 From: Pablo Lara Date: Wed, 12 Mar 2025 09:33:24 +0100 Subject: [PATCH] chore: auto refresh if the state is also available (#7195) --- ui/app/(prowler)/scans/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/app/(prowler)/scans/page.tsx b/ui/app/(prowler)/scans/page.tsx index ea2b812f3e..d79f7e7af1 100644 --- a/ui/app/(prowler)/scans/page.tsx +++ b/ui/app/(prowler)/scans/page.tsx @@ -50,8 +50,11 @@ export default async function Scans({ // Get scans data to check for executing scans const scansData = await getScansByState(); + const hasExecutingScan = scansData?.data?.some( - (scan: ScanProps) => scan.attributes.state === "executing", + (scan: ScanProps) => + scan.attributes.state === "executing" || + scan.attributes.state === "available", ); return (