diff --git a/dashboard/src/pages/TestDetails/TestDetails.tsx b/dashboard/src/pages/TestDetails/TestDetails.tsx index f4331405..c98d3e3e 100644 --- a/dashboard/src/pages/TestDetails/TestDetails.tsx +++ b/dashboard/src/pages/TestDetails/TestDetails.tsx @@ -53,6 +53,11 @@ const LogExcerpt = ({ test }: TTestDetailsDefaultProps): JSX.Element => { const TestDetailsSection = ({ test }: { test: TTestDetails }): JSX.Element => { const intl = useIntl(); + const misc = test.environment_misc ?? test.misc; + const platform: string = misc + ? JSON.parse(misc).platform + : intl.formatMessage({ id: 'global.unknown' }); + const infos: ISubsection['infos'] = useMemo(() => { const baseInfo = [ { @@ -92,10 +97,7 @@ const TestDetailsSection = ({ test }: { test: TTestDetails }): JSX.Element => { }, { title: intl.formatMessage({ id: 'testDetails.platform' }), - linkText: - test.misc?.platform ?? - test.environment_misc?.platform ?? - intl.formatMessage({ id: 'global.unknown' }), + linkText: platform, icon: , }, ]; @@ -104,14 +106,13 @@ const TestDetailsSection = ({ test }: { test: TTestDetails }): JSX.Element => { intl, test.architecture, test.compiler, - test.environment_misc?.platform, test.git_commit_hash, test.git_repository_branch, test.git_repository_url, test.log_url, - test.misc?.platform, test.path, test.status, + platform, ]); return ; }; diff --git a/dashboard/src/types/tree/TestDetails.tsx b/dashboard/src/types/tree/TestDetails.tsx index fde7713e..f128d45a 100644 --- a/dashboard/src/types/tree/TestDetails.tsx +++ b/dashboard/src/types/tree/TestDetails.tsx @@ -3,14 +3,14 @@ export type TTestDetails = { build_id: string; compiler: string; config_name: string; - environment_misc: Record | undefined; + environment_misc: string | undefined; git_commit_hash: string; git_repository_branch: string; git_repository_url: string; id: string; log_excerpt: string | undefined; log_url: string | undefined; - misc: Record | undefined; + misc: string | undefined; path: string; start_time: string; status: string;