From 7a7cca7b4bce0ae5053c419b630e06d2e8ee1d54 Mon Sep 17 00:00:00 2001
From: cjenkscybercom <christina.jenks@knowit.se>
Date: Wed, 1 Nov 2023 15:15:57 +0100
Subject: [PATCH] CE-2203: modify host details ioc table col widths, remove
 own-iocs

---
 src/components/IOC/IOCTable/IOCTable.js       | 54 ++-----------------
 .../common/LabeledIcon/LabeledIcon.js         |  2 -
 2 files changed, 3 insertions(+), 53 deletions(-)

diff --git a/src/components/IOC/IOCTable/IOCTable.js b/src/components/IOC/IOCTable/IOCTable.js
index 9e9c8f70..4b8cbc57 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 4c67f939..a75f1580 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}
       />
-- 
GitLab