mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-01-25 02:08:11 +00:00
fix(findings): remove default status filtering (#6785)
Co-authored-by: Pablo Lara <larabjj@gmail.com>
This commit is contained in:
@@ -31,15 +31,14 @@ export default async function Findings({
|
||||
// Make sure the sort is correctly encoded
|
||||
const encodedSort = sort?.replace(/^\+/, "");
|
||||
|
||||
// Extract all filter parameters and combine with default filters
|
||||
const defaultFilters = {
|
||||
"filter[status__in]": "FAIL, PASS",
|
||||
};
|
||||
|
||||
const filters: Record<string, string> = {
|
||||
...defaultFilters,
|
||||
...Object.fromEntries(
|
||||
Object.entries(searchParams).filter(([key]) => key.startsWith("filter[")),
|
||||
Object.entries(searchParams)
|
||||
.filter(([key]) => key.startsWith("filter["))
|
||||
.map(([key, value]) => [
|
||||
key,
|
||||
Array.isArray(value) ? value.join(",") : value?.toString() || "",
|
||||
]),
|
||||
),
|
||||
};
|
||||
|
||||
@@ -142,15 +141,14 @@ const SSRDataTable = async ({
|
||||
// Make sure the sort is correctly encoded
|
||||
const encodedSort = sort.replace(/^\+/, "");
|
||||
|
||||
// Extract all filter parameters and combine with default filters
|
||||
const defaultFilters = {
|
||||
"filter[status__in]": "FAIL, PASS",
|
||||
};
|
||||
|
||||
const filters: Record<string, string> = {
|
||||
...defaultFilters,
|
||||
...Object.fromEntries(
|
||||
Object.entries(searchParams).filter(([key]) => key.startsWith("filter[")),
|
||||
Object.entries(searchParams)
|
||||
.filter(([key]) => key.startsWith("filter["))
|
||||
.map(([key, value]) => [
|
||||
key,
|
||||
Array.isArray(value) ? value.join(",") : value?.toString() || "",
|
||||
]),
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user