UI: Fix the rendering of scanned machines in UI
This commit is contained in:
parent
9048f72030
commit
d0d08f7649
|
@ -538,9 +538,11 @@ class ReportPageComponent extends AuthComponent {
|
|||
<BreachedServers />
|
||||
</div>
|
||||
|
||||
{/* Post breach data should be separated from scanned machines
|
||||
<div style={{marginBottom: '20px'}}>
|
||||
<PostBreach data={this.state.report.glance.scanned}/>
|
||||
</div>
|
||||
*/}
|
||||
|
||||
<div style={{marginBottom: '20px'}}>
|
||||
<StolenPasswords
|
||||
|
|
|
@ -9,6 +9,10 @@ export let renderIpAddresses = function (val) {
|
|||
</div>;
|
||||
};
|
||||
|
||||
export let renderMachineArray = function(array) {
|
||||
return <>{array.map(x => <div key={x.network_interfaces[0]}>{x.network_interfaces[0]}</div>)}</>;
|
||||
}
|
||||
|
||||
export let renderLimitedArray = function (array,
|
||||
limit,
|
||||
className='',
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue