From 8ccfe990dff2a1379fa0c61194577cec2152b039 Mon Sep 17 00:00:00 2001 From: lfjnascimento Date: Wed, 11 Sep 2024 16:18:32 -0300 Subject: [PATCH] wip --- .../src/pages/TreeDetails/Tabs/Build/BuildTab.tsx | 11 ++--------- dashboard/src/pages/TreeDetails/TreeDetails.tsx | 8 -------- dashboard/src/pages/TreeDetails/TreeDetailsFilter.tsx | 4 ++-- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx b/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx index 2b1675b7..4a5b0d3a 100644 --- a/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx +++ b/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx @@ -127,6 +127,7 @@ const BuildTab = ({ treeDetailsData }: BuildTab): JSX.Element => { const intl = useIntl(); const accordionContent = useMemo(() => { + console.log('treeDetailsData:', treeDetailsData); return treeDetailsData?.builds.map(row => ({ ...row, config: row.config ?? '-', @@ -142,16 +143,8 @@ const BuildTab = ({ treeDetailsData }: BuildTab): JSX.Element => { '-' ), date: row.date?.split('T')[0], - testStatus: { - failTests: row.testStatus?.failTests ?? 0, - errorTests: row.testStatus?.errorTests ?? 0, - passTests: row.testStatus?.passTests ?? 0, - skipTests: row.testStatus?.skipTests ?? 0, - doneTests: row.testStatus?.doneTests ?? 0, - missTests: row.testStatus?.missTests ?? 0, - }, })); - }, [treeDetailsData?.builds]); + }, [treeDetailsData]); const filteredContent = filterBy.buildsTable === 'all' diff --git a/dashboard/src/pages/TreeDetails/TreeDetails.tsx b/dashboard/src/pages/TreeDetails/TreeDetails.tsx index e601017d..10dafc1b 100644 --- a/dashboard/src/pages/TreeDetails/TreeDetails.tsx +++ b/dashboard/src/pages/TreeDetails/TreeDetails.tsx @@ -172,14 +172,6 @@ function TreeDetails(): JSX.Element { buildErrors: isBuildError(value), status: value.valid === null ? 'null' : value.valid ? 'valid' : 'invalid', - testStatus: { - failTests: value.status?.fail_tests, - passTests: value.status?.pass_tests, - errorTests: value.status?.error_tests, - skipTests: value.status?.skip_tests, - missTests: value.status?.miss_tests, - doneTests: value.status?.done_tests, - }, buildLogs: value.log_url, kernelConfig: value.config_url, kernelImage: value.misc ? value.misc['kernel_type'] : undefined, diff --git a/dashboard/src/pages/TreeDetails/TreeDetailsFilter.tsx b/dashboard/src/pages/TreeDetails/TreeDetailsFilter.tsx index ed2312c4..1a8a2dd2 100644 --- a/dashboard/src/pages/TreeDetails/TreeDetailsFilter.tsx +++ b/dashboard/src/pages/TreeDetails/TreeDetailsFilter.tsx @@ -24,7 +24,7 @@ import { TFilterObjectsKeys, TFilterNumberKeys, isTFilterObjectKeys, - TreeDetails as TreeDetailsType, + BootsTab, } from '@/types/tree/TreeDetails'; import { useBuildsTab } from '@/api/TreeDetails'; import { Skeleton } from '@/components/Skeleton'; @@ -83,7 +83,7 @@ export const mapFilterToReq = ( return filterMapped; }; -export const createFilter = (data: TreeDetailsType | undefined): TFilter => { +export const createFilter = (data: BootsTab | undefined): TFilter => { const buildStatus = { Success: false, Failure: false }; const bootStatus: TFilterValues = {};