Skip to content

Commit

Permalink
Add Client / Client URL column
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Reynolds <[email protected]>
  • Loading branch information
gsreynolds committed Dec 4, 2023
1 parent 80439b9 commit 01fba70
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/config/column-generator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 01fba70

Please sign in to comment.