diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js index fd1accfb8..3b314ad9b 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js @@ -538,9 +538,11 @@ class ReportPageComponent extends AuthComponent { + {/* Post breach data should be separated from scanned machines
+ */}
; }; +export let renderMachineArray = function(array) { + return <>{array.map(x =>
{x.network_interfaces[0]}
)}; +} + export let renderLimitedArray = function (array, limit, className='', diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/security/ScannedServers.js b/monkey/monkey_island/cc/ui/src/components/report-components/security/ScannedServers.js index 229bbfed2..b2a58d85f 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/security/ScannedServers.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/security/ScannedServers.js @@ -1,19 +1,20 @@ import React from 'react'; import ReactTable from 'react-table'; import Pluralize from 'pluralize'; -import {renderArray, renderIpAddresses} from '../common/RenderArrays'; +import {renderArray, renderIpAddresses, renderMachineArray} from '../common/RenderArrays'; const columns = [ { Header: 'Scanned Servers', columns: [ - {Header: 'Machine', accessor: 'label'}, + {Header: 'Machine', id: 'machine', accessor: x => x.ip_addresses[0]}, { Header: 'IP Addresses', id: 'ip_addresses', accessor: x => renderIpAddresses(x) }, - {Header: 'Accessible From', id: 'accessible_from_nodes', accessor: x => renderArray(x.accessible_from_nodes)}, + {Header: 'Accessible From', id: 'accessible_from_nodes', + accessor: x => renderMachineArray(x.accessible_from_nodes)}, {Header: 'Services', id: 'services', accessor: x => renderArray(x.services)} ] } @@ -27,7 +28,6 @@ class ScannedServersComponent extends React.Component { } render() { - let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length; let showPagination = this.props.data.length > pageSize;