-
{text}
+
+ {text}
);
}
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/StatusesToPillarsSummary.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/StatusesToPillarsSummary.js
index 0002ba9e0..b33481b99 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/StatusesToPillarsSummary.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/StatusesToPillarsSummary.js
@@ -1,8 +1,8 @@
-import React, {Component, Fragment} from "react";
-import PillarLabel from "./PillarLabel";
-import StatusLabel from "./StatusLabel";
-import * as PropTypes from "prop-types";
-import {ZeroTrustStatuses} from "./ZeroTrustPillars";
+import React, {Component, Fragment} from 'react';
+import PillarLabel from './PillarLabel';
+import StatusLabel from './StatusLabel';
+import * as PropTypes from 'prop-types';
+import {ZeroTrustStatuses} from './ZeroTrustPillars';
export default class StatusesToPillarsSummary extends Component {
render() {
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/SummarySection.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/SummarySection.js
index 0f937f341..b6693ab59 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/SummarySection.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/SummarySection.js
@@ -1,9 +1,9 @@
-import React, {Component} from "react";
-import {Col, Grid, Row} from "react-bootstrap";
-import MonkeysStillAliveWarning from "../common/MonkeysStillAliveWarning";
-import PillarsOverview from "./PillarOverview";
-import ZeroTrustReportLegend from "./ReportLegend";
-import * as PropTypes from "prop-types";
+import React, {Component} from 'react';
+import {Col, Grid, Row} from 'react-bootstrap';
+import MonkeysStillAliveWarning from '../common/MonkeysStillAliveWarning';
+import PillarsOverview from './PillarOverview';
+import ZeroTrustReportLegend from './ReportLegend';
+import * as PropTypes from 'prop-types';
export default class SummarySection extends Component {
render() {
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustPillars.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustPillars.js
index dd2a55865..c0bb0c87e 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustPillars.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustPillars.js
@@ -1,18 +1,18 @@
export const ZeroTrustPillars = {
- data: "Data",
- people: "People",
- network: "Networks",
- workload: "Workload",
- devices: "Devices",
- visibility: "Visibility & Analytics",
- automation: "Automation & Orchestration"
+ data: 'Data',
+ people: 'People',
+ network: 'Networks',
+ workload: 'Workload',
+ devices: 'Devices',
+ visibility: 'Visibility & Analytics',
+ automation: 'Automation & Orchestration'
};
export const ZeroTrustStatuses = {
- failed: "Failed",
- verify: "Verify",
- passed: "Passed",
- unexecuted: "Unexecuted"
+ failed: 'Failed',
+ verify: 'Verify',
+ passed: 'Passed',
+ unexecuted: 'Unexecuted'
};
export default ZeroTrustPillars;
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/ArcNode.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/ArcNode.js
index aee1fb7f2..938e23e88 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/ArcNode.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/ArcNode.js
@@ -41,17 +41,17 @@ class ArcNode extends React.Component {
}
- handleClick(e_) {
+ handleClick() {
this.props.disableHover(this.refs.overlay);
}
- handleOver(e_) {
+ handleOver() {
if (this.props.hover) {
this.refs.overlay.show();
}
}
- handleOut(e_) {
+ handleOut() {
if (this.props.hover) {
this.refs.overlay.hide();
}
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/CircularNode.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/CircularNode.js
index 5c84d95a5..5c6ec3d7c 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/CircularNode.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/CircularNode.js
@@ -1,5 +1,5 @@
import React from 'react'
-import PillarLabel from "../PillarLabel";
+import PillarLabel from '../PillarLabel';
import {Popover, OverlayTrigger} from 'react-bootstrap';
import PropTypes from 'prop-types';
@@ -38,17 +38,17 @@ class CircularNode extends React.Component {
}
- handleClick(e_) {
+ handleClick() {
this.props.disableHover(this.refs.overlay);
}
- handleOver(e_) {
+ handleOver() {
if (this.props.hover) {
this.refs.overlay.show();
}
}
- handleOut(e_) {
+ handleOut() {
if (this.props.hover) {
this.refs.overlay.hide();
}
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/VennDiagram.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/VennDiagram.js
index 70304daad..a7fc698a0 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/VennDiagram.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/venn-components/VennDiagram.js
@@ -4,7 +4,7 @@ import CircularNode from './CircularNode'
import ArcNode from './ArcNode'
import {TypographicUtilities} from './Utility.js'
import './VennDiagram.css'
-import {ZeroTrustStatuses} from "../ZeroTrustPillars";
+import {ZeroTrustStatuses} from '../ZeroTrustPillars';
class VennDiagram extends React.Component {
constructor(props_) {
@@ -131,16 +131,12 @@ class VennDiagram extends React.Component {
let self = this;
- let hidden = 'none';
- let html = '';
- let bcolor = '#DEDEDE';
-
if (this.state.currentPopover !== undefined) {
this.state.currentPopover.show();
}
- document.querySelectorAll('circle, path').forEach((d_, i_) => {
- d_.setAttribute('opacity', "0.8");
+ document.querySelectorAll('circle, path').forEach((d_) => {
+ d_.setAttribute('opacity', '0.8');
});
if (e.target.id.includes('Node')) {
@@ -175,10 +171,9 @@ class VennDiagram extends React.Component {
let data = [];
const omit = (prop, {[prop]: _, ...rest}) => rest;
- this.props.pillarsGrades.forEach((d_, i_) => {
+ this.props.pillarsGrades.forEach((d_) => {
let params = omit('pillar', d_);
- let sum = Object.keys(params).reduce((sum_, key_) => sum_ + parseFloat(params[key_] || 0), 0);
let key = TypographicUtilities.removeAmpersand(d_.pillar);
let html = self.buildTooltipHtmlContent(params);
let rule = null;
diff --git a/monkey/monkey_island/cc/ui/src/components/run-monkey/AwsRunTable.js b/monkey/monkey_island/cc/ui/src/components/run-monkey/AwsRunTable.js
index f2815a142..ac9231d82 100644
--- a/monkey/monkey_island/cc/ui/src/components/run-monkey/AwsRunTable.js
+++ b/monkey/monkey_island/cc/ui/src/components/run-monkey/AwsRunTable.js
@@ -1,6 +1,6 @@
import React from 'react';
import ReactTable from 'react-table'
-import checkboxHOC from "react-table/lib/hoc/selectTable";
+import checkboxHOC from 'react-table/lib/hoc/selectTable';
const CheckboxTable = checkboxHOC(ReactTable);
@@ -28,7 +28,7 @@ class AwsRunTableComponent extends React.Component {
}
}
- toggleSelection = (key, shift, row) => {
+ toggleSelection = (key) => {
// start off with the existing state
let selection = [...this.state.selection];
const keyIndex = selection.indexOf(key);
@@ -68,13 +68,13 @@ class AwsRunTableComponent extends React.Component {
};
getTrProps = (s, r) => {
- let color = "inherit";
+ let color = 'inherit';
if (r) {
let instId = r.original.instance_id;
if (this.isSelected(instId)) {
- color = "#ffed9f";
+ color = '#ffed9f';
} else if (this.state.result.hasOwnProperty(instId)) {
- color = this.state.result[instId] ? "#00f01b" : '#f00000'
+ color = this.state.result[instId] ? '#00f01b' : '#f00000'
}
}
diff --git a/monkey/monkey_island/cc/ui/src/components/side-menu/VersionComponent.js b/monkey/monkey_island/cc/ui/src/components/side-menu/VersionComponent.js
index 1246b5b94..18d711a0f 100644
--- a/monkey/monkey_island/cc/ui/src/components/side-menu/VersionComponent.js
+++ b/monkey/monkey_island/cc/ui/src/components/side-menu/VersionComponent.js
@@ -18,7 +18,7 @@ class VersionComponent extends React.Component {
this.setState({
currentVersion: res['current_version'],
newerVersion: res['newer_version'],
- downloadLink: res['download_link'],
+ downloadLink: res['download_link']
});
});
}
diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/Checkbox.js b/monkey/monkey_island/cc/ui/src/components/ui-components/Checkbox.js
index f200a6fdb..e143e0aba 100644
--- a/monkey/monkey_island/cc/ui/src/components/ui-components/Checkbox.js
+++ b/monkey/monkey_island/cc/ui/src/components/ui-components/Checkbox.js
@@ -34,7 +34,7 @@ class CheckboxComponent extends React.PureComponent {
}
this.setState({
checked: !this.state.checked,
- isAnimating: true,
+ isAnimating: true
}, () => {
this.props.changeHandler ? this.props.changeHandler(this.props.name, this.state.checked) : null
});
diff --git a/monkey/monkey_island/cc/ui/src/components/utils/SaveJsonToFile.js b/monkey/monkey_island/cc/ui/src/components/utils/SaveJsonToFile.js
index 6ad124457..29940c63c 100644
--- a/monkey/monkey_island/cc/ui/src/components/utils/SaveJsonToFile.js
+++ b/monkey/monkey_island/cc/ui/src/components/utils/SaveJsonToFile.js
@@ -1,7 +1,7 @@
-import FileSaver from "file-saver";
+import FileSaver from 'file-saver';
export default function saveJsonToFile(dataToSave, filename) {
const content = JSON.stringify(dataToSave, null, 2);
- const blob = new Blob([content], {type: "text/plain;charset=utf-8"});
- FileSaver.saveAs(blob, filename + ".json");
+ const blob = new Blob([content], {type: 'text/plain;charset=utf-8'});
+ FileSaver.saveAs(blob, filename + '.json');
}
diff --git a/monkey/monkey_island/cc/ui/src/server_config/ServerConfig.js b/monkey/monkey_island/cc/ui/src/server_config/ServerConfig.js
index c71cc4d94..bd71817e1 100644
--- a/monkey/monkey_island/cc/ui/src/server_config/ServerConfig.js
+++ b/monkey/monkey_island/cc/ui/src/server_config/ServerConfig.js
@@ -1,6 +1,6 @@
import StandardConfig from './StandardConfig';
import AwsConfig from './AwsConfig';
-import PasswordConfig from "./PasswordConfig";
+import PasswordConfig from './PasswordConfig';
const SERVER_CONFIG_JSON = require('../../../server_config.json');
diff --git a/monkey/monkey_island/cc/ui/src/services/AuthService.js b/monkey/monkey_island/cc/ui/src/services/AuthService.js
index c26979afe..6163e95cd 100644
--- a/monkey/monkey_island/cc/ui/src/services/AuthService.js
+++ b/monkey/monkey_island/cc/ui/src/services/AuthService.js
@@ -4,8 +4,8 @@ import decode from 'jwt-decode';
export default class AuthService {
// SHA3-512 of '1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()'
NO_AUTH_CREDS =
- "55e97c9dcfd22b8079189ddaeea9bce8125887e3237b800c6176c9afa80d2062" +
- "8d2c8d0b1538d2208c1444ac66535b764a3d902b35e751df3faec1e477ed3557";
+ '55e97c9dcfd22b8079189ddaeea9bce8125887e3237b800c6176c9afa80d2062' +
+ '8d2c8d0b1538d2208c1444ac66535b764a3d902b35e751df3faec1e477ed3557';
SECONDS_BEFORE_JWT_EXPIRES = 20;