forked from p15670423/monkey
UI: Add formatting to StolenPasswordsComponent
This component was used in security and attack report with two different sets of data. The first one is from the credentials endpoint which needed formatting and the second from the telemetry which was already formatted.
This commit is contained in:
parent
27c0b838c4
commit
5e1adbb877
|
@ -18,7 +18,9 @@ class T1003 extends React.Component {
|
|||
<br/>
|
||||
{this.props.data.status === ScanStatus.USED ?
|
||||
<StolenPasswordsComponent
|
||||
data={this.props.data.stolen_creds}/>
|
||||
data={this.props.data.stolen_creds}
|
||||
format={false}
|
||||
/>
|
||||
: ''}
|
||||
<MitigationsComponent mitigations={this.props.data.mitigations}/>
|
||||
</div>
|
||||
|
|
|
@ -537,7 +537,10 @@ class ReportPageComponent extends AuthComponent {
|
|||
</div>
|
||||
|
||||
<div style={{marginBottom: '20px'}}>
|
||||
<StolenPasswords data={this.state.stolenCredentials}/>
|
||||
<StolenPasswords
|
||||
data={this.state.stolenCredentials}
|
||||
format={true}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<StrongUsers data={this.state.report.glance.strong_users}/>
|
||||
|
|
|
@ -22,7 +22,11 @@ class StolenPasswordsComponent extends React.Component {
|
|||
render() {
|
||||
let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length;
|
||||
let showPagination = this.props.data.length > pageSize;
|
||||
let table_data = getCredentialsTableData(this.props.data);
|
||||
let table_data = this.props.data;
|
||||
if(this.props.format) {
|
||||
table_data = getCredentialsTableData(this.props.data);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="data-table-container">
|
||||
<ReactTable
|
||||
|
|
Loading…
Reference in New Issue