diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js b/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js
index fd6175ee1..a901c63cf 100755
--- a/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js
+++ b/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js
@@ -3,7 +3,7 @@ import {Col, Grid, Row} from 'react-bootstrap';
import AuthComponent from '../AuthComponent';
import ReportHeader, {ReportTypes} from "../report-components/common/ReportHeader";
import PillarsOverview from "../report-components/zerotrust/PillarOverview";
-import FindingsTable from "../report-components/zerotrust/FindingsTable";
+import FindingsSection from "../report-components/zerotrust/FindingsSection";
import SinglePillarRecommendationsStatus from "../report-components/zerotrust/SinglePillarRecommendationsStatus";
import MonkeysStillAliveWarning from "../report-components/common/MonkeysStillAliveWarning";
import ReportLoader from "../report-components/common/ReportLoader";
@@ -99,7 +99,7 @@ class ZeroTrustReportPageComponent extends AuthComponent {
happened in your network. This will enable you to match up with your SOC logs and alerts and to gain deeper
insight as to what exactly happened during this test.
-
+
);
}
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/EventsAndButtonComponent.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/EventsAndButtonComponent.js
index 0b96f8fc2..867efc049 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/EventsAndButtonComponent.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/EventsAndButtonComponent.js
@@ -26,7 +26,7 @@ export default class EventsAndButtonComponent extends Component {
-
+
Show Events
{
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ExportEventsButton.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ExportEventsButton.js
index b75516e2c..e5c3b1b6f 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ExportEventsButton.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ExportEventsButton.js
@@ -4,7 +4,7 @@ import * as PropTypes from "prop-types";
export default class ExportEventsButton extends Component {
render() {
- return
Export Events
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsSection.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsSection.js
new file mode 100644
index 000000000..85ecd2ff1
--- /dev/null
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsSection.js
@@ -0,0 +1,38 @@
+import React, {Component, Fragment} from "react";
+import PillarLabel from "./PillarLabel";
+import EventsAndButtonComponent from "./EventsAndButtonComponent";
+import {ZeroTrustStatuses} from "./ZeroTrustPillars";
+import {FindingsTable} from "./FindingsTable";
+
+
+class FindingsSection extends Component {
+ render() {
+ return (
+
+
+
+
+
+ );
+ }
+
+ getFilteredFindings(statusToFilter) {
+ const findings = this.props.findings.map((finding) => {
+ // Deep copy
+ const newFinding = JSON.parse(JSON.stringify(finding));
+ if (newFinding.status === statusToFilter) {
+ newFinding.pillars = newFinding.pillars.map((pillar) => {
+ return {name: pillar, status: this.props.pillarsToStatuses[pillar]}
+ });
+ return newFinding;
+ }
+ });
+ // Filter nulls out of the list
+ return findings.filter(function (el) {
+ return el != null;
+ });
+ }
+}
+
+
+export default FindingsSection;
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js
index 353689b86..f414a5cad 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js
@@ -1,13 +1,28 @@
import React, {Component, Fragment} from "react";
-import PillarLabel from "./PillarLabel";
+import StatusLabel from "./StatusLabel";
import PaginatedTable from "../common/PaginatedTable";
+import * as PropTypes from "prop-types";
+import PillarLabel from "./PillarLabel";
import EventsAndButtonComponent from "./EventsAndButtonComponent";
-
const columns = [
{
columns: [
- { Header: 'Pillars', id: "pillars",
+ {
+ Header: 'Finding', accessor: 'test',
+ style: {'whiteSpace': 'unset'} // This enables word wrap
+ },
+
+ {
+ Header: 'Events', id: "events",
+ accessor: x => {
+ return ;
+ },
+ maxWidth: 160,
+ },
+
+ {
+ Header: 'Pillars', id: "pillars",
accessor: x => {
const pillars = x.pillars;
const pillarLabels = pillars.map((pillar) =>
@@ -18,34 +33,19 @@ const columns = [
maxWidth: 200,
style: {'whiteSpace': 'unset'}
},
- { Header: 'Finding', accessor: 'test',
- style: {'whiteSpace': 'unset'} // This enables word wrap
- },
-
- { Header: 'Events', id:"events",
- accessor: x => {
- return ;
- },
- maxWidth: 160,
- }
]
}
];
-class FindingsTable extends Component {
+
+export class FindingsTable extends Component {
render() {
- const data = this.props.findings.map((finding) => {
- const newFinding = JSON.parse(JSON.stringify(finding));
- newFinding.pillars = newFinding.pillars.map((pillar) => {
- return {name: pillar, status: this.props.pillarsToStatuses[pillar]}
- });
- return newFinding;
- });
- return (
-
- );
+ return
+ {
+
} tests' findings
+
+
}
}
-
-export default FindingsTable;
+FindingsTable.propTypes = {data: PropTypes.array, status: PropTypes.string};
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatusTable.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatusTable.js
index d8b1a99b5..e2f9259de 100644
--- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatusTable.js
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatusTable.js
@@ -16,10 +16,10 @@ const columns = [
},
maxWidth: 80
},
- { Header: 'Recommendation', accessor: 'recommendation',
+ { Header: 'ZT Recommendation', accessor: 'recommendation',
style: {'whiteSpace': 'unset'} // This enables word wrap
},
- { Header: 'Tests', id: 'tests',
+ { Header: 'Monkey Tests', id: 'tests',
style: {'whiteSpace': 'unset'}, // This enables word wrap
accessor: x => {
return ;