cc: Change variables from snake case to camel case for consistency

This commit is contained in:
Shreya Malviya 2021-10-11 18:02:17 +05:30
parent ee5585af75
commit e3045c255a
1 changed files with 15 additions and 15 deletions

View File

@ -53,29 +53,29 @@ class T1086 extends React.Component {
} }
segregatePowershellDataPerCategory() { segregatePowershellDataPerCategory() {
let exploit_category_name = 'exploit'; let exploitCategoryName = 'exploit';
let pba_category_name = 'post_breach'; let pbaCategoryName = 'post_breach';
let data_from_exploits = []; let dataFromExploits = [];
let data_from_pbas = []; let dataFromPBAs = [];
for (let rowIdx in this.props.data.cmds) { for (let rowIdx in this.props.data.cmds) {
let row = this.props.data.cmds[rowIdx]; let row = this.props.data.cmds[rowIdx];
if (row.telem_category == exploit_category_name) { if (row.telem_category == exploitCategoryName) {
data_from_exploits.push(row); dataFromExploits.push(row);
} }
else if (row.telem_category == pba_category_name) { else if (row.telem_category == pbaCategoryName) {
data_from_pbas.push(row); dataFromPBAs.push(row);
} }
} }
return [data_from_exploits, data_from_pbas] return [dataFromExploits, dataFromPBAs]
} }
render() { render() {
let segregatedData = this.segregatePowershellDataPerCategory(); let segregatedData = this.segregatePowershellDataPerCategory();
let data_from_exploits = segregatedData[0]; let dataFromExploits = segregatedData[0];
let data_from_pbas = segregatedData[1]; let dataFromPBAs = segregatedData[1];
return ( return (
<div> <div>
@ -85,17 +85,17 @@ class T1086 extends React.Component {
<div> <div>
<ReactTable <ReactTable
columns={T1086.getPowershellColumnsForExploits()} columns={T1086.getPowershellColumnsForExploits()}
data={data_from_exploits} data={dataFromExploits}
showPagination={false} showPagination={false}
defaultPageSize={data_from_exploits.length} defaultPageSize={dataFromExploits.length}
/> />
<br/> <br/>
<br/> <br/>
<ReactTable <ReactTable
columns={T1086.getPowershellColumnsForPBAs()} columns={T1086.getPowershellColumnsForPBAs()}
data={data_from_pbas} data={dataFromPBAs}
showPagination={false} showPagination={false}
defaultPageSize={data_from_pbas.length} defaultPageSize={dataFromPBAs.length}
/> />
</div> : ''} </div> : ''}
<MitigationsComponent mitigations={this.props.data.mitigations}/> <MitigationsComponent mitigations={this.props.data.mitigations}/>