mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-09 21:14:22 +00:00
feat: filters relationships in findings and scans page (#8046)
Co-authored-by: Pablo Lara <larabjj@gmail.com>
This commit is contained in:
co-authored by
Pablo Lara
parent
b3f2a1c532
commit
6b7b700a98
@@ -2,3 +2,4 @@ export * from "./auto-refresh";
|
||||
export * from "./link-to-findings-from-scan";
|
||||
export * from "./no-providers-added";
|
||||
export * from "./no-providers-connected";
|
||||
export * from "./scans-filters";
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CustomButton } from "../ui/custom";
|
||||
|
||||
export const NoProvidersAdded = () => {
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center dark:bg-prowler-blue-800">
|
||||
<div className="flex min-h-screen items-center justify-center">
|
||||
<div className="mx-auto w-full max-w-7xl px-4">
|
||||
<Card className="mx-auto w-full max-w-3xl rounded-lg dark:bg-prowler-blue-400">
|
||||
<CardBody className="flex flex-col items-center space-y-4 p-6 text-center sm:p-8">
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
"use client";
|
||||
|
||||
import { filterScans } from "@/components/filters/data-filters";
|
||||
import { FilterControls } from "@/components/filters/filter-controls";
|
||||
import { useRelatedFilters } from "@/hooks";
|
||||
import { FilterEntity, FilterType } from "@/types";
|
||||
|
||||
interface ScansFiltersProps {
|
||||
providerUIDs: string[];
|
||||
providerDetails: { [uid: string]: FilterEntity }[];
|
||||
}
|
||||
|
||||
export const ScansFilters = ({
|
||||
providerUIDs,
|
||||
providerDetails,
|
||||
}: ScansFiltersProps) => {
|
||||
const { availableProviderUIDs } = useRelatedFilters({
|
||||
providerUIDs,
|
||||
providerDetails,
|
||||
enableScanRelation: false,
|
||||
});
|
||||
|
||||
return (
|
||||
<FilterControls
|
||||
customFilters={[
|
||||
...filterScans,
|
||||
{
|
||||
key: FilterType.PROVIDER_UID,
|
||||
labelCheckboxGroup: "Provider UID",
|
||||
values: availableProviderUIDs,
|
||||
valueLabelMapping: providerDetails,
|
||||
index: 1,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user