Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lfjnascimento committed Sep 11, 2024
1 parent e77cfcc commit 8ccfe99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
11 changes: 2 additions & 9 deletions dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '-',
Expand All @@ -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'
Expand Down
8 changes: 0 additions & 8 deletions dashboard/src/pages/TreeDetails/TreeDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/pages/TreeDetails/TreeDetailsFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 = {};
Expand Down

0 comments on commit 8ccfe99

Please sign in to comment.