This report shows information about - + techniques used by Infection Monkey.
{this.renderLegend()} @@ -105,7 +105,7 @@ class AttackReport extends React.Component { } getTechniqueByTitle(title){ - for (let tech_id in this.state.techniques){ + for (const tech_id in this.state.techniques){ if (! this.state.techniques.hasOwnProperty(tech_id)) {return false;} let technique = this.state.techniques[tech_id]; if (technique.title === title){ @@ -118,10 +118,10 @@ class AttackReport extends React.Component { static addLinksToTechniques(schema, techniques){ schema = schema.properties; - for(let type in schema){ + for(const type in schema){ if (! schema.hasOwnProperty(type)) {return false;} let typeTechniques = schema[type].properties; - for(let tech_id in typeTechniques){ + for(const tech_id in typeTechniques){ if (! typeTechniques.hasOwnProperty(tech_id)) {return false;} if (typeTechniques[tech_id] !== undefined){ techniques[tech_id]['link'] = typeTechniques[tech_id].link diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrix.js b/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrixComponent.js similarity index 90% rename from monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrix.js rename to monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrixComponent.js index 559262790..9be5d5f0b 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrix.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrixComponent.js @@ -5,7 +5,7 @@ import ReactTable from 'react-table'; import 'filepond/dist/filepond.min.css'; import '../../../styles/report/ReportAttackMatrix.scss'; -class MatrixComponent extends React.Component { +class ReportMatrixComponent extends React.Component { constructor(props) { super(props); this.state = {techniques: this.props.techniques, @@ -14,7 +14,7 @@ class MatrixComponent extends React.Component { getColumns() { let columns = []; - for(let type_key in this.state.schema.properties){ + for(const type_key in this.state.schema.properties){ if (! this.state.schema.properties.hasOwnProperty(type_key)){ continue; } @@ -31,11 +31,11 @@ class MatrixComponent extends React.Component { getTableRows() { let rows = []; - for (let tech_id in this.state.techniques) { + for (const tech_id in this.state.techniques) { if (this.state.techniques.hasOwnProperty(tech_id)){ let technique_added = false; let technique = this.state.techniques[tech_id]; - for(let row of rows){ + for(const row of rows){ if (! row.hasOwnProperty(technique.type)){ row[technique.type] = technique; technique_added = true; @@ -81,4 +81,4 @@ class MatrixComponent extends React.Component { } } -export default MatrixComponent; +export default ReportMatrixComponent; diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/attack/SelectedTechnique.js b/monkey/monkey_island/cc/ui/src/components/report-components/attack/SelectedTechnique.js index 0af502682..10c448e99 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/attack/SelectedTechnique.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/attack/SelectedTechnique.js @@ -62,7 +62,7 @@ class SelectedTechnique extends React.Component { return (