From 01fba70ed3b08e614d11b91f6a87dfc0ecdf51ec Mon Sep 17 00:00:00 2001 From: Gavin Reynolds Date: Mon, 4 Dec 2023 16:32:03 +0000 Subject: [PATCH 1/2] Add Client / Client URL column Signed-off-by: Gavin Reynolds --- src/config/column-generator.jsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/config/column-generator.jsx b/src/config/column-generator.jsx index fad535c5..3c053070 100644 --- a/src/config/column-generator.jsx +++ b/src/config/column-generator.jsx @@ -735,6 +735,24 @@ export const defaultAlertsColumns = () => [ minWidth: 100, renderer: renderPlainTextAlertCell, }), + incidentColumn({ + id: 'client', + header: 'Client', + columnType: 'alert', + accessor: (incident) => incident.alerts?.[0]?.body?.cef_details?.client || '', + minWidth: 100, + renderer: ({ + value, cell, + }) => { + if (value.length > 0) { + return renderLinkCell({ + text: value, + href: cell.row.original.alerts?.[0]?.body?.cef_details?.client_url || cell.row.original.html_url, + }); + } + return renderPlainTextAlertCell({ value, cell }); + }, + }), ]; export const customAlertColumnForSavedColumn = (savedColumn) => { From 8967906422327799b456b97cf5d79390a518a121 Mon Sep 17 00:00:00 2001 From: Gavin Reynolds Date: Mon, 4 Dec 2023 16:32:15 +0000 Subject: [PATCH 2/2] Add Timestamp column Signed-off-by: Gavin Reynolds --- src/config/column-generator.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config/column-generator.jsx b/src/config/column-generator.jsx index 3c053070..e08a4343 100644 --- a/src/config/column-generator.jsx +++ b/src/config/column-generator.jsx @@ -753,6 +753,14 @@ export const defaultAlertsColumns = () => [ return renderPlainTextAlertCell({ value, cell }); }, }), + incidentColumn({ + id: 'creation_time', + header: 'Timestamp', + columnType: 'alert', + accessor: (incident) => incident.alerts?.[0]?.body?.cef_details?.creation_time || '', + minWidth: 100, + renderer: renderPlainTextAlertCell, + }), ]; export const customAlertColumnForSavedColumn = (savedColumn) => {