diff --git a/dashboard/src/components/Cards/HardwareTested.tsx b/dashboard/src/components/Cards/HardwareTested.tsx index 519c24e9..af5ad34c 100644 --- a/dashboard/src/components/Cards/HardwareTested.tsx +++ b/dashboard/src/components/Cards/HardwareTested.tsx @@ -9,14 +9,20 @@ import type { TTreeTestsData } from '@/types/tree/TreeDetails'; import { ScrollArea } from '@/components/ui/scroll-area'; +import type { TFilter } from '@/types/general'; + +import FilterLink from '@/components/Tabs/FilterLink'; + interface IHardwareTested extends Pick { title: IBaseCard['title']; + diffFilter: TFilter; } const HardwareTested = ({ environmentCompatible, title, + diffFilter, }: IHardwareTested): JSX.Element => { return ( - } - /> + filterValue={hardwareTestedName} + filterSection="hardware" + diffFilter={diffFilter} + > + + } + /> + ); })} diff --git a/dashboard/src/components/Cards/HardwareUsed.tsx b/dashboard/src/components/Cards/HardwareUsed.tsx index 50e39831..86c73cb7 100644 --- a/dashboard/src/components/Cards/HardwareUsed.tsx +++ b/dashboard/src/components/Cards/HardwareUsed.tsx @@ -4,22 +4,41 @@ import type { IBaseCard } from '@/components/Cards/BaseCard'; import BaseCard from '@/components/Cards/BaseCard'; import { Badge } from '@/components/ui/badge'; +import type { TFilter } from '@/types/general'; + +import FilterLink from '@/components/Tabs/FilterLink'; interface IHardwareUsed { title: IBaseCard['title']; hardwareUsed?: string[]; + diffFilter: TFilter; } -const HardwareUsed = ({ hardwareUsed, title }: IHardwareUsed): JSX.Element => { +const HardwareUsed = ({ + hardwareUsed, + title, + diffFilter, +}: IHardwareUsed): JSX.Element => { const hardwareSorted = useMemo(() => { return hardwareUsed?.sort().map(hardware => { return ( - - {hardware} - + + + {hardware} + + ); }); - }, [hardwareUsed]); + }, [diffFilter, hardwareUsed]); return ( { } environmentCompatible={data.bootEnvironmentCompatible} + diffFilter={diffFilter} /> @@ -184,6 +185,7 @@ const BootsTab = ({ reqFilter }: BootsTabProps): JSX.Element => { } environmentCompatible={data.bootEnvironmentCompatible} + diffFilter={diffFilter} /> diff --git a/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx b/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx index 464db87e..c1e86471 100644 --- a/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx +++ b/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx @@ -156,6 +156,7 @@ const TestsTab = ({ reqFilter }: TestsTabProps): JSX.Element => { } environmentCompatible={data.testEnvironmentCompatible} + diffFilter={diffFilter} /> @@ -187,6 +188,7 @@ const TestsTab = ({ reqFilter }: TestsTabProps): JSX.Element => { } environmentCompatible={data.testEnvironmentCompatible} + diffFilter={diffFilter} /> diff --git a/dashboard/src/pages/TreeDetails/TreeDetails.tsx b/dashboard/src/pages/TreeDetails/TreeDetails.tsx index c270ffd1..e233b748 100644 --- a/dashboard/src/pages/TreeDetails/TreeDetails.tsx +++ b/dashboard/src/pages/TreeDetails/TreeDetails.tsx @@ -308,6 +308,7 @@ function TreeDetails(): JSX.Element { } hardwareUsed={testsData?.hardwareUsed} + diffFilter={diffFilter} />