diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js index ada0e08ba..d7a86c9f9 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js @@ -21,30 +21,13 @@ export class FindingsTable extends Component { { Header: 'Details', id: 'details', - accessor: x => { - if (x.finding_type === 'scoutsuite_finding') { - return ; - } else if (x.finding_type === 'monkey_finding') { - return ; - } - }, + accessor: x => this.getFindingDetails(x), maxWidth: EVENTS_COLUMN_MAX_WIDTH }, { Header: 'Pillars', id: 'pillars', - accessor: x => { - const pillars = x.pillars; - const pillarLabels = pillars.map((pillar) => - - ); - return
{pillarLabels}
; - }, + accessor: x => this.getFindingPillars(x), maxWidth: PILLARS_COLUMN_MAX_WIDTH, style: {'whiteSpace': 'unset'} } @@ -52,6 +35,27 @@ export class FindingsTable extends Component { } ]; + getFindingDetails(finding) { + if (finding.finding_type === 'scoutsuite_finding') { + return ; + } else if (finding.finding_type === 'monkey_finding') { + return ; + } + } + + getFindingPillars(finding) { + const pillars = finding.pillars; + const pillarLabels = pillars.map((pillar) => + + ); + return
{pillarLabels}
; + } + render() { return

{