diff --git a/frontend/src/components/molecules/MetaDataRow/index.jsx b/frontend/src/components/molecules/MetaDataRow/index.jsx index c6d46e57..99ec7e91 100644 --- a/frontend/src/components/molecules/MetaDataRow/index.jsx +++ b/frontend/src/components/molecules/MetaDataRow/index.jsx @@ -1,9 +1,15 @@ import "./index.less"; +import { + CheckCircleIcon, + ExclamationCircleIcon, + ExclamationTriangleIcon, +} from "@patternfly/react-icons"; import { Table, Tbody, Th, Thead, Tr } from "@patternfly/react-table"; import PropTypes from "prop-types"; import { Title } from "@patternfly/react-core"; +import { formatTime } from "@/helpers/Formatters.js"; import { uid } from "@/utils/helper.js"; import { useMemo } from "react"; import { useSelector } from "react-redux"; @@ -25,7 +31,24 @@ const MetadataRow = (props) => { NODE_COUNT: nodeCount, }; }, [clusterMetaData, nodeKeys, nodeCount]); - + const defaultValue = useMemo(() => { + return { + clusterType: "SNO spoke", + networkType: "OVNKubernetes", + masterNodesCount: "1", + master_type: "Baremetal", + totalNodesCount: "1", + }; + }, []); + const icons = useMemo( + () => ({ + failed: , + failure: , + success: , + upstream_failed: , + }), + [] + ); return ( <> @@ -44,7 +67,13 @@ const MetadataRow = (props) => { {memoObj[props?.category].map((item) => ( <Tr key={uid()}> <Th>{item.name}</Th> - <Th>{props.metadata[item.value]}</Th> + <Th> + {item.value === "jobDuration" + ? formatTime(props.metadata[item.value]) + : item.value === "jobStatus" + ? icons[props.metadata[item.value]] + : props.metadata[item.value] ?? defaultValue[item.value]} + </Th> </Tr> ))} </Tbody> diff --git a/frontend/src/reducers/telcoReducer.js b/frontend/src/reducers/telcoReducer.js index e87ff820..15ab045f 100644 --- a/frontend/src/reducers/telcoReducer.js +++ b/frontend/src/reducers/telcoReducer.js @@ -36,23 +36,18 @@ const initialState = { ], clusterMetaData: [ { name: "Release Binary", value: "releaseStream" }, - { name: "Cluster Name", value: "clusterName" }, + { name: "Cluster Name", value: "nodeName" }, { name: "Cluster Type", value: "clusterType" }, { name: "Network Type", value: "networkType" }, { name: "Benchmark Status", value: "jobStatus" }, { name: "Duration", value: "jobDuration" }, - { name: "Test ID", value: "uuid" }, ], nodeKeys: [ - { name: "Master", value: "masterNodesCount" }, - { name: "Worker", value: "workerNodesType" }, - { name: "Infra", value: "infraNodesType" }, + { name: "Master", value: "master_type" }, { name: "Workload", value: "benchmark" }, ], nodeCount: [ { name: "Master", value: "masterNodesCount" }, - { name: "Worker", value: "workerNodesCount" }, - { name: "Infra", value: "infraNodesCount" }, { name: "Total", value: "totalNodesCount" }, ], filterData: [],