From db85dfe24afc82a3a00dcd390b7373659b14ca22 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Thu, 15 Aug 2019 10:23:06 +0300 Subject: [PATCH] Added sec issues to ZT report as well and gridified the overview section --- .../components/pages/ZeroTrustReportPage.js | 33 ++++++++++++++----- .../zerotrust/PillarLabel.js | 2 +- .../zerotrust/PillarOverview.js | 2 -- .../zerotrust/PillarsSummary.js | 4 +-- 4 files changed, 27 insertions(+), 14 deletions(-) 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 3bc0e38e1..fd464da80 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js @@ -1,5 +1,5 @@ import React from 'react'; -import {Button, Col} from 'react-bootstrap'; +import {Button, Col, Row, Grid} from 'react-bootstrap'; import AuthComponent from '../AuthComponent'; import ReportHeader, {ReportTypes} from "../report-components/common/ReportHeader"; import PillarsOverview from "../report-components/zerotrust/PillarOverview"; @@ -8,6 +8,8 @@ import {SinglePillarDirectivesStatus} from "../report-components/zerotrust/Singl import {MonkeysStillAliveWarning} from "../report-components/common/MonkeysStillAliveWarning"; import ReportLoader from "../report-components/common/ReportLoader"; import MustRunMonkeyWarning from "../report-components/common/MustRunMonkeyWarning"; +import {SecurityIssuesGlance} from "../report-components/common/SecurityIssuesGlance"; +import {PillarsSummary} from "../report-components/zerotrust/PillarsSummary"; class ZeroTrustReportPageComponent extends AuthComponent { @@ -60,12 +62,6 @@ class ZeroTrustReportPageComponent extends AuthComponent { if (this.stillLoadingDataFromServer()) { content = ; } else { - console.log(this.state.pillars); - const pillarsSection =
-

Pillars Overview

- -
; - const directivesSection =

Directives status

{ @@ -84,8 +80,19 @@ class ZeroTrustReportPageComponent extends AuthComponent {
; content =
- - {pillarsSection} +

Overview

+ + + + + + + + + + + + {directivesSection} {findingSection}
; @@ -140,6 +147,14 @@ class ZeroTrustReportPageComponent extends AuthComponent { }); }); } + + anyIssuesFound() { + const severe = function(finding) { + return (finding.status === "Conclusive" || finding.status === "Inconclusive"); + }; + + return this.state.findings.some(severe); + } } export default ZeroTrustReportPageComponent; diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarLabel.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarLabel.js index 51f5f988f..958327a37 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarLabel.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarLabel.js @@ -26,6 +26,6 @@ export class PillarLabel extends Component { }; const className = "label " + pillarToColor[this.props.pillar]; - return {this.props.pillar} + return
{this.props.pillar}
} } diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarOverview.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarOverview.js index 0636ab679..a6c6f848f 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarOverview.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarOverview.js @@ -21,8 +21,6 @@ const columns = [ class PillarOverview extends Component { render() { return (
- -
); } diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarsSummary.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarsSummary.js index e029b50e6..8881eba7d 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarsSummary.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PillarsSummary.js @@ -16,13 +16,13 @@ export class PillarsSummary extends Component { if (this.props.pillars[status].length > 0) { return

{status}

-

+

{ this.props.pillars[status].map((pillar) => { return }) } -

+
} }