From e24883a38af4ed80333613cdaf7517f3cc20ef46 Mon Sep 17 00:00:00 2001 From: Nikhil Shahi Date: Tue, 9 Aug 2022 20:04:20 -0500 Subject: [PATCH] make row columns clickable --- frontend/src/components/AlertList/List.tsx | 11 ++++++----- frontend/src/components/Endpoint/AlertList.tsx | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/AlertList/List.tsx b/frontend/src/components/AlertList/List.tsx index 4b933690..6a71b984 100644 --- a/frontend/src/components/AlertList/List.tsx +++ b/frontend/src/components/AlertList/List.tsx @@ -125,6 +125,7 @@ const List: React.FC = React.memo( selector: (row: Alert) => row.riskScore || "", cell: (row: Alert) => ( = React.memo( sortable: true, selector: (row: Alert) => `${row.apiEndpoint.method}_${row.apiEndpoint.path}`, cell: (row: Alert) => ( - + = React.memo( sortable: true, selector: (row: Alert) => row.type || "", cell: (row: Alert) => ( - + {row.type} ), @@ -175,7 +176,7 @@ const List: React.FC = React.memo( sortable: true, selector: (row: Alert) => row.description || "", cell: (row: Alert) => ( - + {row.description} ), @@ -187,7 +188,7 @@ const List: React.FC = React.memo( sortable: true, selector: (row: Alert) => row.createdAt.toISOString(), cell: (row: Alert) => ( - + {getDateTimeString(row.createdAt)} ), @@ -199,7 +200,7 @@ const List: React.FC = React.memo( sortable: true, selector: (row: Alert) => row.resolved, cell: (row: Alert) => ( - + {row.resolved ? : } ), diff --git a/frontend/src/components/Endpoint/AlertList.tsx b/frontend/src/components/Endpoint/AlertList.tsx index 209795ad..0fa1e2ae 100644 --- a/frontend/src/components/Endpoint/AlertList.tsx +++ b/frontend/src/components/Endpoint/AlertList.tsx @@ -49,6 +49,7 @@ const AlertList: React.FC = React.memo( selector: (row: Alert) => row.riskScore || "", cell: (row: Alert) => ( = React.memo( sortable: true, selector: (row: Alert) => `${row.apiEndpoint.method}_${row.apiEndpoint.path}`, cell: (row: Alert) => ( - + = React.memo( sortable: true, selector: (row: Alert) => row.type || "", cell: (row: Alert) => ( - + {row.type} ), @@ -103,7 +104,7 @@ const AlertList: React.FC = React.memo( sortable: true, selector: (row: Alert) => row.description || "", cell: (row: Alert) => ( - + {row.description} ), @@ -115,7 +116,7 @@ const AlertList: React.FC = React.memo( sortable: true, selector: (row: Alert) => row.createdAt.toISOString(), cell: (row: Alert) => ( - + {getDateTimeString(row.createdAt)} ), @@ -129,7 +130,7 @@ const AlertList: React.FC = React.memo( sortable: true, selector: (row: Alert) => row.resolved, cell: (row: Alert) => ( - + {row.resolved ? : } ),