diff --git a/monkey/monkey_island/cc/resources/reporting/report.py b/monkey/monkey_island/cc/resources/reporting/report.py index 5c9ff314a..384ca09fe 100644 --- a/monkey/monkey_island/cc/resources/reporting/report.py +++ b/monkey/monkey_island/cc/resources/reporting/report.py @@ -69,7 +69,7 @@ def get_all_findings(): def get_recommendations_status(): - return [ + network_recomms = [ { "Recommendation": "Do network segmentation.", "Status": "Positive", @@ -84,16 +84,6 @@ def get_recommendations_status(): }, ] }, - { - "Recommendation": "Install AV software.", - "Status": "Unexecuted", - "Tests": [ - { - "Test": "Search for active AV software processes", - "Status": "Unexecuted" - } - ] - }, { "Recommendation": "Analyze malicious network traffic.", "Status": "Inconclusive", @@ -124,6 +114,51 @@ def get_recommendations_status(): }, ] + device_recomms = [ + { + "Recommendation": "Install AV software.", + "Status": "Unexecuted", + "Tests": [ + { + "Test": "Search for active AV software processes", + "Status": "Unexecuted" + } + ] + }, + ] + + data_recommns = [ + { + "Recommendation": "Data at trasnit should be...", + "Status": "Conclusive", + "Tests": [ + { + "Test": "Scan HTTP.", + "Status": "Conclusive" + }, + { + "Test": "Scan elastic.", + "Status": "Unexecuted" + } + ] + }, + ] + + return [ + { + "pillar": "Networks", + "recommendationStatus": network_recomms + }, + { + "pillar": "Data", + "recommendationStatus": data_recommns + }, + { + "pillar": "Devices", + "recommendationStatus": device_recomms + }, + ] + def get_pillars_grades(): return [ 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 dc0730102..630952961 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js @@ -1,10 +1,10 @@ import React from 'react'; import {Button, Col} from 'react-bootstrap'; import AuthComponent from '../AuthComponent'; -import ReportHeader, { ReportTypes } from "../report-components/common/ReportHeader"; +import ReportHeader, {ReportTypes} from "../report-components/common/ReportHeader"; import PillarGrades from "../report-components/zerotrust/PillarGrades"; import FindingsTable from "../report-components/zerotrust/FindingsTable"; -import RecommendationsStatusTable from "../report-components/zerotrust/RecommendationsStatus"; +import {SinglePillarRecommendationsStatus} from "../report-components/zerotrust/SinglePillarRecommendationsStatus"; class ZeroTrustReportPageComponent extends AuthComponent { @@ -40,13 +40,29 @@ class ZeroTrustReportPageComponent extends AuthComponent { if (this.stillLoadingDataFromServer()) { content = "Still empty"; } else { - content =
+ const pillarsSection =

Pillars Overview

- -

Recommendations Status

- -

Findings

- + +
; + + const recommendationsSection =

Recommendations Status

+ { + this.state.recommendations.map((recommendation) => + + ) + } +
; + + const findingSection =

Findings

+
; + + content =
+ {pillarsSection} + {recommendationsSection} + {findingSection}
; } diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatus.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatusTable.js similarity index 80% rename from monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatus.js rename to monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatusTable.js index b23f84d16..dda771717 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatus.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/RecommendationsStatusTable.js @@ -1,5 +1,6 @@ import React, {Component} from "react"; import PagenatedTable from "../common/PagenatedTable"; +import AuthComponent from "../../AuthComponent"; const columns = [ { @@ -29,7 +30,7 @@ const columns = [ } ]; -class TestsStatus extends Component { +class TestsStatus extends AuthComponent { render() { return (
{JSON.stringify(this.props.tests,null,2)}
@@ -37,9 +38,9 @@ class TestsStatus extends Component { } } -export class RecommendationsStatusTable extends Component { +export class RecommendationsStatusTable extends AuthComponent { render() { - return ; + return ; } } diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/SinglePillarRecommendationsStatus.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/SinglePillarRecommendationsStatus.js new file mode 100644 index 000000000..802b7a0a2 --- /dev/null +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/SinglePillarRecommendationsStatus.js @@ -0,0 +1,15 @@ +import AuthComponent from "../../AuthComponent"; +import {PillarLabel} from "./PillarLabel"; +import RecommendationsStatusTable from "./RecommendationsStatusTable"; +import React from "react"; + +export class SinglePillarRecommendationsStatus extends AuthComponent { + render() { + return ( +
+

+ +
+ ); + } +}