From 4896abf5a65d3b173a466555d1e4e416598d8eac Mon Sep 17 00:00:00 2001 From: Marcelo Robert Santos Date: Wed, 8 Jan 2025 08:23:46 -0300 Subject: [PATCH] feat: add breadcrumb and historyState to issueDetails Closes #592 --- .../components/BuildDetails/BuildDetails.tsx | 10 +++- .../BuildDetails/BuildDetailsTestSection.tsx | 5 +- dashboard/src/components/Cards/IssuesList.tsx | 14 +++++- .../src/components/Issue/IssueSection.tsx | 13 +++-- .../components/IssueDetails/IssueDetails.tsx | 3 ++ .../src/components/Table/TableComponents.tsx | 9 +--- .../components/TestDetails/TestDetails.tsx | 4 ++ .../TestsTable/IndividualTestsTable.tsx | 7 +-- .../src/components/TestsTable/TestsTable.tsx | 7 +-- .../src/pages/IssueDetails/IssueDetails.tsx | 50 ++++++++++++++++--- .../pages/TreeDetails/Tabs/Boots/BootsTab.tsx | 6 ++- .../pages/TreeDetails/Tabs/Build/BuildTab.tsx | 10 +++- .../pages/TreeDetails/Tabs/Tests/TestsTab.tsx | 6 ++- .../hardwareDetails/Tabs/Boots/BootsTab.tsx | 5 ++ .../hardwareDetails/Tabs/Build/BuildTab.tsx | 6 ++- .../hardwareDetails/Tabs/Tests/TestsTab.tsx | 6 +++ 16 files changed, 121 insertions(+), 40 deletions(-) diff --git a/dashboard/src/components/BuildDetails/BuildDetails.tsx b/dashboard/src/components/BuildDetails/BuildDetails.tsx index 63d6091b..3a97ed96 100644 --- a/dashboard/src/components/BuildDetails/BuildDetails.tsx +++ b/dashboard/src/components/BuildDetails/BuildDetails.tsx @@ -6,7 +6,11 @@ import { FormattedMessage, useIntl } from 'react-intl'; import { ErrorBoundary } from 'react-error-boundary'; import { useMemo } from 'react'; -import type { HistoryState, LinkProps } from '@tanstack/react-router'; +import { + useSearch, + type HistoryState, + type LinkProps, +} from '@tanstack/react-router'; import SectionGroup from '@/components/Section/SectionGroup'; import type { ISection } from '@/components/Section/Section'; @@ -53,6 +57,7 @@ const BuildDetails = ({ getTestTableRowLink, historyState, }: BuildDetailsProps): JSX.Element => { + const searchParams = useSearch({ from: '/build/$buildId' }); const { data, error, isLoading } = useBuildDetails(buildId ?? ''); const { data: issueData, status: issueStatus } = useBuildIssues( buildId ?? '', @@ -217,11 +222,12 @@ const BuildDetails = ({ onClickFilter={onClickFilter} tableFilter={tableFilter} getRowLink={getTestTableRowLink} - historyState={historyState} /> diff --git a/dashboard/src/components/BuildDetails/BuildDetailsTestSection.tsx b/dashboard/src/components/BuildDetails/BuildDetailsTestSection.tsx index c14367c1..af381a58 100644 --- a/dashboard/src/components/BuildDetails/BuildDetailsTestSection.tsx +++ b/dashboard/src/components/BuildDetails/BuildDetailsTestSection.tsx @@ -1,6 +1,6 @@ import { useIntl } from 'react-intl'; -import type { HistoryState, LinkProps } from '@tanstack/react-router'; +import type { LinkProps } from '@tanstack/react-router'; import { Separator } from '@/components/ui/separator'; @@ -17,7 +17,6 @@ interface IBuildDetailsTestSection { onClickFilter: (filter: TestsTableFilter) => void; tableFilter: TableFilter; getRowLink: (testId: string) => LinkProps; - historyState?: HistoryState; } const BuildDetailsTestSection = ({ @@ -25,7 +24,6 @@ const BuildDetailsTestSection = ({ onClickFilter, tableFilter, getRowLink, - historyState, }: IBuildDetailsTestSection): JSX.Element => { const intl = useIntl(); const { data, error, isLoading } = useBuildTests(buildId); @@ -45,7 +43,6 @@ const BuildDetailsTestSection = ({ onClickFilter={onClickFilter} filter={tableFilter.testsTable} getRowLink={getRowLink} - historyState={historyState} /> ) : ( diff --git a/dashboard/src/components/Cards/IssuesList.tsx b/dashboard/src/components/Cards/IssuesList.tsx index 3897ebd4..04de09b1 100644 --- a/dashboard/src/components/Cards/IssuesList.tsx +++ b/dashboard/src/components/Cards/IssuesList.tsx @@ -13,7 +13,12 @@ import ListingItem, { ItemType } from '@/components/ListingItem/ListingItem'; import ColoredCircle from '@/components/ColoredCircle/ColoredCircle'; import { NoIssueFound } from '@/components/Issue/IssueSection'; -import type { TFilter, TFilterObjectsKeys, TIssue } from '@/types/general'; +import type { + RedirectFrom, + TFilter, + TFilterObjectsKeys, + TIssue, +} from '@/types/general'; import FilterLink from '@/components/Tabs/FilterLink'; @@ -29,6 +34,8 @@ interface IIssuesList { title: IBaseCard['title']; diffFilter: TFilter; issueFilterSection: TFilterObjectsKeys; + detailsId?: string; + pageFrom?: RedirectFrom; } const IssuesList = ({ @@ -37,6 +44,8 @@ const IssuesList = ({ title, diffFilter, issueFilterSection, + detailsId, + pageFrom, }: IIssuesList): JSX.Element => { const getIssueLink = useCallback( (issueId: string, version: string): LinkProps => ({ @@ -46,8 +55,9 @@ const IssuesList = ({ versionNumber: version, }, search: s => s, + state: { id: detailsId, from: pageFrom }, }), - [], + [detailsId, pageFrom], ); const intl = useIntl(); diff --git a/dashboard/src/components/Issue/IssueSection.tsx b/dashboard/src/components/Issue/IssueSection.tsx index dffa0e73..a1189b15 100644 --- a/dashboard/src/components/Issue/IssueSection.tsx +++ b/dashboard/src/components/Issue/IssueSection.tsx @@ -4,6 +4,7 @@ import { FormattedMessage } from 'react-intl'; import type { UseQueryResult } from '@tanstack/react-query'; +import type { HistoryState, LinkProps } from '@tanstack/react-router'; import { Link } from '@tanstack/react-router'; import { RiProhibited2Line } from 'react-icons/ri'; @@ -27,9 +28,13 @@ export const NoIssueFound = (): JSX.Element => { const IssueSection = ({ data, status, + historyState, + previousSearch, }: { data?: TIssue[]; status: UseQueryResult['status']; + historyState?: HistoryState; + previousSearch: LinkProps['search']; }): JSX.Element => { const issueList = useMemo( () => @@ -37,8 +42,10 @@ const IssueSection = ({ s} + to="/issue/$issueId/version/$versionNumber" + params={{ issueId: issue.id, versionNumber: issue.version }} + state={historyState} + search={previousSearch} > )), - [data], + [data, historyState, previousSearch], ); return ( diff --git a/dashboard/src/components/IssueDetails/IssueDetails.tsx b/dashboard/src/components/IssueDetails/IssueDetails.tsx index 60965f42..edf9ddaa 100644 --- a/dashboard/src/components/IssueDetails/IssueDetails.tsx +++ b/dashboard/src/components/IssueDetails/IssueDetails.tsx @@ -33,6 +33,7 @@ interface IIssueDetails { getTestTableRowLink: (testId: string) => LinkProps; onClickBuildFilter: (filter: BuildsTableFilter) => void; getBuildTableRowLink: (testId: string) => LinkProps; + breadcrumb?: JSX.Element; } export const IssueDetails = ({ @@ -43,6 +44,7 @@ export const IssueDetails = ({ getTestTableRowLink, onClickBuildFilter, getBuildTableRowLink, + breadcrumb, }: IIssueDetails): JSX.Element => { const { data, error, isLoading } = useIssueDetails(issueId, versionNumber); @@ -159,6 +161,7 @@ export const IssueDetails = ({ return ( + {breadcrumb} {hasTest && ( { cell: Cell; rowIndex: number; openLogSheet: (index: number) => void; - historyState?: HistoryState; detailsLinkProps: LinkProps; } @@ -25,7 +24,6 @@ const TableCellComponent = ({ cell, rowIndex, openLogSheet, - historyState, detailsLinkProps, }: ITableCellComponent): JSX.Element => { const handleClick = useCallback(() => { @@ -38,7 +36,7 @@ const TableCellComponent = ({ const parsedLinkProps: LinkProps = cell.column.id === DETAILS_COLUMN_ID ? detailsLinkProps - : { search: s => s, state: historyState }; + : { search: s => s, state: s => s }; return ( { row: Row; index: number; currentLog?: number; - historyState?: HistoryState; openLogSheet: (index: number) => void; getRowLink: (detailsId: string) => LinkProps; } @@ -67,7 +64,6 @@ const TableRowComponent = ({ row, index, currentLog, - historyState, openLogSheet, getRowLink, }: ITableRowComponent): JSX.Element => { @@ -87,7 +83,6 @@ const TableRowComponent = ({ key={cellIdx} cell={cell} rowIndex={index} - historyState={historyState} openLogSheet={openLogSheet} detailsLinkProps={linkProps} /> diff --git a/dashboard/src/components/TestDetails/TestDetails.tsx b/dashboard/src/components/TestDetails/TestDetails.tsx index d81466ae..f1204a48 100644 --- a/dashboard/src/components/TestDetails/TestDetails.tsx +++ b/dashboard/src/components/TestDetails/TestDetails.tsx @@ -213,6 +213,8 @@ const TestDetails = ({ breadcrumb, testId, }: TestsDetailsProps): JSX.Element => { + const historyState = useRouterState({ select: s => s.location.state }); + const searchParams = useSearch({ from: '/test/$testId' }); const { data, error, isLoading } = useTestDetails(testId ?? ''); const { data: issueData, status: issueStatus } = useTestIssues(testId ?? ''); @@ -243,6 +245,8 @@ const TestDetails = ({ diff --git a/dashboard/src/components/TestsTable/IndividualTestsTable.tsx b/dashboard/src/components/TestsTable/IndividualTestsTable.tsx index 1a1f0cd5..daba006e 100644 --- a/dashboard/src/components/TestsTable/IndividualTestsTable.tsx +++ b/dashboard/src/components/TestsTable/IndividualTestsTable.tsx @@ -10,7 +10,7 @@ import { useVirtualizer } from '@tanstack/react-virtual'; import type { CSSProperties } from 'react'; import { useCallback, useMemo, useRef, useState } from 'react'; -import type { HistoryState, LinkProps } from '@tanstack/react-router'; +import type { LinkProps } from '@tanstack/react-router'; import type { TestHistory, TIndividualTest } from '@/types/general'; @@ -27,14 +27,12 @@ const ESTIMATED_ROW_HEIGHT = 60; interface IIndividualTestsTable { columns: ColumnDef[]; data: TIndividualTest[]; - historyState?: HistoryState; getRowLink: (testId: TestHistory['id']) => LinkProps; } export function IndividualTestsTable({ data, columns, - historyState, getRowLink, }: IIndividualTestsTable): JSX.Element { const [sorting, setSorting] = useState([]); @@ -107,11 +105,10 @@ export function IndividualTestsTable({ openLogSheet={openLogSheet} currentLog={currentLog} getRowLink={getRowLink} - historyState={historyState} /> ); }); - }, [virtualItems, rows, openLogSheet, getRowLink, currentLog, historyState]); + }, [virtualItems, rows, openLogSheet, getRowLink, currentLog]); // if more performance is needed, try using translate as in the example from tanstack virtual instead of padding // https://tanstack.com/virtual/latest/docs/framework/react/examples/table diff --git a/dashboard/src/components/TestsTable/TestsTable.tsx b/dashboard/src/components/TestsTable/TestsTable.tsx index b506f1d1..09a8dd60 100644 --- a/dashboard/src/components/TestsTable/TestsTable.tsx +++ b/dashboard/src/components/TestsTable/TestsTable.tsx @@ -17,7 +17,7 @@ import { Fragment, useCallback, useMemo, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import type { HistoryState, LinkProps } from '@tanstack/react-router'; +import type { LinkProps } from '@tanstack/react-router'; import type { TestsTableFilter } from '@/types/tree/TreeDetails'; import { possibleTestsTableFilter } from '@/types/tree/TreeDetails'; @@ -53,7 +53,6 @@ export interface ITestsTable { getRowLink: (testId: TestHistory['id']) => LinkProps; updatePathFilter?: (pathFilter: string) => void; currentPathFilter?: string; - historyState?: HistoryState; } // TODO: would be useful if the navigation happened within the table, so the parent component would only be required to pass the navigation url instead of the whole function for the update and the currentPath diffFilter (boots/tests Table) @@ -67,7 +66,6 @@ export function TestsTable({ getRowLink, updatePathFilter, currentPathFilter, - historyState, }: ITestsTable): JSX.Element { const [sorting, setSorting] = useState([]); const [expanded, setExpanded] = useState({}); @@ -333,7 +331,6 @@ export function TestsTable({ getRowLink={getRowLink} data={data[row.index].individual_tests} columns={innerColumns} - historyState={historyState} /> @@ -347,7 +344,7 @@ export function TestsTable({ ); - }, [columns.length, data, getRowLink, innerColumns, modelRows, historyState]); + }, [columns.length, data, getRowLink, innerColumns, modelRows]); return (
diff --git a/dashboard/src/pages/IssueDetails/IssueDetails.tsx b/dashboard/src/pages/IssueDetails/IssueDetails.tsx index ad813df5..9d4cfd34 100644 --- a/dashboard/src/pages/IssueDetails/IssueDetails.tsx +++ b/dashboard/src/pages/IssueDetails/IssueDetails.tsx @@ -1,7 +1,12 @@ import type { LinkProps } from '@tanstack/react-router'; -import { useNavigate, useParams, useSearch } from '@tanstack/react-router'; +import { + useNavigate, + useParams, + useRouterState, + useSearch, +} from '@tanstack/react-router'; -import { useCallback } from 'react'; +import { useCallback, useMemo } from 'react'; import { IssueDetails } from '@/components/IssueDetails/IssueDetails'; import type { @@ -9,6 +14,9 @@ import type { TestsTableFilter, } from '@/types/tree/TreeDetails'; import { zTableFilterInfoDefault } from '@/types/tree/TreeDetails'; +import { RedirectFrom } from '@/types/general'; +import { MemoizedTreeBreadcrumb } from '@/components/Breadcrumb/TreeBreadcrumb'; +import { MemoizedHardwareBreadcrumb } from '@/components/Breadcrumb/HardwareBreadcrumb'; const ISSUE_ROUTE = '/issue/$issueId/version/$versionNumber'; @@ -18,20 +26,45 @@ const getBuildTableRowLink = (buildId: string): LinkProps => ({ buildId: buildId, }, search: s => s, + state: s => s, }); const getTestTableRowLink = (testId: string): LinkProps => ({ - to: '/test/$testId', - params: { - testId: testId, - }, - search: s => s, + to: '/test/$testId', + params: { + testId: testId, + }, + search: s => s, + state: s => s, }); const IssueDetailsPage = (): JSX.Element => { const searchParams = useSearch({ from: ISSUE_ROUTE }); const { issueId, versionNumber } = useParams({ from: ISSUE_ROUTE }); const navigate = useNavigate({ from: ISSUE_ROUTE }); + const historyState = useRouterState({ select: s => s.location.state }); + + const breadcrumbComponent = useMemo(() => { + if (historyState.id !== undefined) { + if (historyState.from === RedirectFrom.Tree) { + return ( + + ); + } + + if (historyState.from === RedirectFrom.Hardware) { + return ( + + ); + } + } + }, [historyState.from, historyState.id, searchParams]); const onClickTestFilter = useCallback( (filter: TestsTableFilter): void => { @@ -45,6 +78,7 @@ const IssueDetailsPage = (): JSX.Element => { }, }; }, + state: s => s, }); }, [navigate], @@ -62,6 +96,7 @@ const IssueDetailsPage = (): JSX.Element => { }, }; }, + state: s => s, }); }, [navigate], @@ -76,6 +111,7 @@ const IssueDetailsPage = (): JSX.Element => { getTestTableRowLink={getTestTableRowLink} onClickBuildFilter={onClickBuildFilter} getBuildTableRowLink={getBuildTableRowLink} + breadcrumb={breadcrumbComponent} /> ); }; diff --git a/dashboard/src/pages/TreeDetails/Tabs/Boots/BootsTab.tsx b/dashboard/src/pages/TreeDetails/Tabs/Boots/BootsTab.tsx index 2107e2a0..2e9b0fec 100644 --- a/dashboard/src/pages/TreeDetails/Tabs/Boots/BootsTab.tsx +++ b/dashboard/src/pages/TreeDetails/Tabs/Boots/BootsTab.tsx @@ -27,7 +27,7 @@ import MemoizedConfigList from '@/components/Tabs/Tests/ConfigsList'; import MemoizedErrorsSummary from '@/components/Tabs/Tests/ErrorsSummary'; import MemoizedStatusCard from '@/components/Tabs/Tests/StatusCard'; -import type { TFilter } from '@/types/general'; +import { RedirectFrom, type TFilter } from '@/types/general'; import TreeCommitNavigationGraph from '@/pages/TreeDetails/Tabs/TreeCommitNavigationGraph'; @@ -158,6 +158,8 @@ const BootsTab = ({ reqFilter }: BootsTabProps): JSX.Element => { failedWithUnknownIssues={data.failedBootsWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="bootIssue" + detailsId={treeId} + pageFrom={RedirectFrom.Tree} />
@@ -193,6 +195,8 @@ const BootsTab = ({ reqFilter }: BootsTabProps): JSX.Element => { failedWithUnknownIssues={data.failedBootsWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="bootIssue" + detailsId={treeId} + pageFrom={RedirectFrom.Tree} />
diff --git a/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx b/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx index 35cc2c13..06f51154 100644 --- a/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx +++ b/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx @@ -2,7 +2,7 @@ import { FormattedMessage } from 'react-intl'; import { useCallback } from 'react'; -import { useNavigate, useSearch } from '@tanstack/react-router'; +import { useNavigate, useParams, useSearch } from '@tanstack/react-router'; import type { ITreeDetails } from '@/pages/TreeDetails/TreeDetails'; @@ -22,7 +22,7 @@ import { MobileGrid, } from '@/components/Tabs/TabGrid'; -import type { TFilterObjectsKeys } from '@/types/general'; +import { RedirectFrom, type TFilterObjectsKeys } from '@/types/general'; import { TreeDetailsBuildsTable } from './TreeDetailsBuildsTable'; @@ -39,6 +39,8 @@ const BuildTab = ({ treeDetailsData }: BuildTab): JSX.Element => { from: '/tree/$treeId', }); + const { treeId } = useParams({ from: '/tree/$treeId' }); + const toggleFilterBySection = useCallback( (filterSectionKey: string, filterSection: TFilterObjectsKeys): void => { navigate({ @@ -85,6 +87,8 @@ const BuildTab = ({ treeDetailsData }: BuildTab): JSX.Element => { } diffFilter={diffFilter} issueFilterSection="buildIssue" + detailsId={treeId} + pageFrom={RedirectFrom.Tree} />
@@ -122,6 +126,8 @@ const BuildTab = ({ treeDetailsData }: BuildTab): JSX.Element => { } diffFilter={diffFilter} issueFilterSection="buildIssue" + detailsId={treeId} + pageFrom={RedirectFrom.Tree} /> diff --git a/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx b/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx index c9f30359..1244ad44 100644 --- a/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx +++ b/dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx @@ -29,7 +29,7 @@ import MemoizedConfigList from '@/components/Tabs/Tests/ConfigsList'; import MemoizedErrorsSummary from '@/components/Tabs/Tests/ErrorsSummary'; import MemoizedStatusCard from '@/components/Tabs/Tests/StatusCard'; -import type { TFilter } from '@/types/general'; +import { RedirectFrom, type TFilter } from '@/types/general'; import TreeCommitNavigationGraph from '@/pages/TreeDetails/Tabs/TreeCommitNavigationGraph'; @@ -160,6 +160,8 @@ const TestsTab = ({ reqFilter }: TestsTabProps): JSX.Element => { failedWithUnknownIssues={data.failedTestsWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="testIssue" + detailsId={treeId} + pageFrom={RedirectFrom.Tree} />
@@ -195,6 +197,8 @@ const TestsTab = ({ reqFilter }: TestsTabProps): JSX.Element => { failedWithUnknownIssues={data.failedTestsWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="testIssue" + detailsId={treeId} + pageFrom={RedirectFrom.Tree} />
diff --git a/dashboard/src/pages/hardwareDetails/Tabs/Boots/BootsTab.tsx b/dashboard/src/pages/hardwareDetails/Tabs/Boots/BootsTab.tsx index d3a6dc6b..095e2193 100644 --- a/dashboard/src/pages/hardwareDetails/Tabs/Boots/BootsTab.tsx +++ b/dashboard/src/pages/hardwareDetails/Tabs/Boots/BootsTab.tsx @@ -31,6 +31,7 @@ import { MemoizedPlatformsCard } from '@/components/Cards/PlatformsCard'; import { sanitizePlatforms } from '@/utils/utils'; import HardwareCommitNavigationGraph from '@/pages/hardwareDetails/Tabs/HardwareCommitNavigationGraph'; +import { RedirectFrom } from '@/types/general'; interface TBootsTab { boots: THardwareDetails['boots']; @@ -116,6 +117,8 @@ const BootsTab = ({ boots, hardwareId, trees }: TBootsTab): JSX.Element => { failedWithUnknownIssues={boots.failedWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="bootIssue" + detailsId={hardwareId} + pageFrom={RedirectFrom.Hardware} />
@@ -164,6 +167,8 @@ const BootsTab = ({ boots, hardwareId, trees }: TBootsTab): JSX.Element => { failedWithUnknownIssues={boots.failedWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="bootIssue" + detailsId={hardwareId} + pageFrom={RedirectFrom.Hardware} />
diff --git a/dashboard/src/pages/hardwareDetails/Tabs/Build/BuildTab.tsx b/dashboard/src/pages/hardwareDetails/Tabs/Build/BuildTab.tsx index bf4c017a..b20c4ef9 100644 --- a/dashboard/src/pages/hardwareDetails/Tabs/Build/BuildTab.tsx +++ b/dashboard/src/pages/hardwareDetails/Tabs/Build/BuildTab.tsx @@ -27,7 +27,7 @@ import { MemoizedConfigsCard } from '@/components/Tabs/Builds/ConfigsCard'; import { MemoizedPlatformsCard } from '@/components/Cards/PlatformsCard'; import HardwareCommitNavigationGraph from '@/pages/hardwareDetails/Tabs/HardwareCommitNavigationGraph'; -import type { TFilterObjectsKeys } from '@/types/general'; +import { RedirectFrom, type TFilterObjectsKeys } from '@/types/general'; import { HardwareDetailsBuildsTable } from './HardwareDetailsBuildsTable'; @@ -110,6 +110,8 @@ const BuildTab = ({ builds, hardwareId, trees }: TBuildTab): JSX.Element => { failedWithUnknownIssues={builds.failedWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="buildIssue" + detailsId={hardwareId} + pageFrom={RedirectFrom.Hardware} />
@@ -158,6 +160,8 @@ const BuildTab = ({ builds, hardwareId, trees }: TBuildTab): JSX.Element => { failedWithUnknownIssues={builds.failedWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="buildIssue" + detailsId={hardwareId} + pageFrom={RedirectFrom.Hardware} /> diff --git a/dashboard/src/pages/hardwareDetails/Tabs/Tests/TestsTab.tsx b/dashboard/src/pages/hardwareDetails/Tabs/Tests/TestsTab.tsx index 0cc8fdfb..2095d8b7 100644 --- a/dashboard/src/pages/hardwareDetails/Tabs/Tests/TestsTab.tsx +++ b/dashboard/src/pages/hardwareDetails/Tabs/Tests/TestsTab.tsx @@ -27,6 +27,8 @@ import { MemoizedPlatformsCard } from '@/components/Cards/PlatformsCard'; import { sanitizePlatforms } from '@/utils/utils'; +import { RedirectFrom } from '@/types/general'; + import HardwareDetailsTestTable from './HardwareDetailsTestsTable'; interface TTestsTab { @@ -101,6 +103,8 @@ const TestsTab = ({ tests, trees, hardwareId }: TTestsTab): JSX.Element => { failedWithUnknownIssues={tests.failedWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="testIssue" + detailsId={hardwareId} + pageFrom={RedirectFrom.Hardware} />
@@ -149,6 +153,8 @@ const TestsTab = ({ tests, trees, hardwareId }: TTestsTab): JSX.Element => { failedWithUnknownIssues={tests.failedWithUnknownIssues} diffFilter={diffFilter} issueFilterSection="testIssue" + detailsId={hardwareId} + pageFrom={RedirectFrom.Hardware} />