diff --git a/src/components/IOC/IOCTable/IOCTable.js b/src/components/IOC/IOCTable/IOCTable.js index 9e9c8f70ddaaaae0cafdfbe9686f342d746bba36..4b8cbc57f392c5fa9339a13fe4df8efd79235e5d 100644 --- a/src/components/IOC/IOCTable/IOCTable.js +++ b/src/components/IOC/IOCTable/IOCTable.js @@ -5,30 +5,6 @@ import { IOCDescription } from "./IOCDescription"; import { IOCStatus } from "./IOCStatus"; import { noWrapText } from "../../common/Helper"; -const ownIocsColumns = [ - { - field: "status", - headerName: "Status", - flex: 0, - headerAlign: "center", - align: "center" - }, - { - field: "namingName", - headerName: "IOC name", - width: "15ch", - sortable: false - }, - { - field: "description", - headerName: "Description", - width: "20ch", - sortable: false - }, - { field: "host", headerName: "Host", width: "10ch", sortable: false }, - { field: "network", headerName: "Network", width: "10ch", sortable: false } -]; - const exploreIocsColumns = [ { field: "status", @@ -40,13 +16,11 @@ const exploreIocsColumns = [ { field: "namingName", headerName: "IOC name", - width: "15ch", sortable: false }, { field: "description", headerName: "Description", - width: "20ch", sortable: false }, { field: "host", headerName: "Host", width: "10ch", sortable: false }, @@ -64,14 +38,13 @@ const hostDetailsColumns = [ { field: "namingName", headerName: "IOC name", - width: "8ch", sortable: false }, { field: "description", headerName: "Description", - width: "20ch", - sortable: false + sortable: false, + flex: 3 } ]; @@ -105,26 +78,6 @@ function createTableRowForHostDetails(ioc) { }; } -function createTableRowForOwnIocs(ioc) { - const { id, activeDeployment, namingName } = ioc; - - return { - id: id, - status: ( - <IOCStatus - id={ioc.id} - activeDeployment={ioc.activeDeployment} - /> - ), - namingName: ( - <Link href={`/iocs/${id}`}>{noWrapText(namingName ?? "---")}</Link> - ), - description: <IOCDescription id={ioc.id} />, - host: createHostLink(activeDeployment?.host), - network: noWrapText(activeDeployment?.host.network || "---") - }; -} - function createTableRowForExploreIocs(ioc) { const { id, namingName, activeDeployment } = ioc; @@ -147,13 +100,12 @@ function createTableRowForExploreIocs(ioc) { export function IOCTable({ iocs = [], - rowType = "own", + rowType = "explore", loading, pagination, onPage }) { const tableTypeSpecifics = { - own: [ownIocsColumns, createTableRowForOwnIocs], host: [hostDetailsColumns, createTableRowForHostDetails], explore: [exploreIocsColumns, createTableRowForExploreIocs] }; diff --git a/src/components/common/LabeledIcon/LabeledIcon.js b/src/components/common/LabeledIcon/LabeledIcon.js index 4c67f939fad94bfdef9d8c97699a11b233652336..a75f15801708e3c77ed2e973b7b6e85965ddb577 100644 --- a/src/components/common/LabeledIcon/LabeledIcon.js +++ b/src/components/common/LabeledIcon/LabeledIcon.js @@ -32,7 +32,6 @@ const LabeledIcon = React.forwardRef((props, ref) => { className={className} > <Icon - title={label} titleAccess={label} {...IconProps} /> @@ -42,7 +41,6 @@ const LabeledIcon = React.forwardRef((props, ref) => { if (labelPosition === "none") { return ( <Icon - title={label} titleAccess={label} {...IconProps} />