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 f9702bf8d..82d90bb7c 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js @@ -3,6 +3,7 @@ import {Button, Col} from 'react-bootstrap'; import AuthComponent from '../AuthComponent'; import ReportHeader, { ReportTypes } from "../report-components/common/ReportHeader"; import ZeroTrustReportPillarGrades from "../report-components/zerotrust/ZeroTrustReportPillarGrades"; +import ZeroTrustReportFindingsTable from "../report-components/zerotrust/ZeroTrustReportFindingsTable"; class ZeroTrustReportPageComponent extends AuthComponent { @@ -43,7 +44,10 @@ class ZeroTrustReportPageComponent extends AuthComponent { content = "Still empty"; } else { content =
+

Pillars Overview

+

Findings

+
; } @@ -59,6 +63,7 @@ class ZeroTrustReportPageComponent extends AuthComponent {
{content} +
THIS IS THE RAW SERVER DATA
             {JSON.stringify(this.state.report, undefined, 2)}
diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustReportFindingsTable.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustReportFindingsTable.js
new file mode 100644
index 000000000..d2f782213
--- /dev/null
+++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustReportFindingsTable.js
@@ -0,0 +1,47 @@
+import React, {Component} from "react";
+import ReactTable from "react-table";
+
+const columns = [
+  {
+    Header: 'Findings',
+    columns: [
+      { Header: 'Test', accessor: 'test'},
+      { Header: 'Pillars', id: "pillars",
+        accessor: x => {
+          const pillars = x.pillars;
+          const listItems = pillars.map((pillar) =>
+            
  • {pillar}
  • + ); + return + } + }, + { Header: 'Events', id:"events", accessor: x => ZeroTrustReportFindingsTable.buildEventsComponent(x)} + ] + } +]; + +const pageSize = 10; + +class ZeroTrustReportFindingsTable extends Component { + render() { + let defaultPageSize = this.props.findings.length > pageSize ? pageSize : this.props.findings.length; + let showPagination = this.props.findings.length > pageSize; + + return ( +
    + +
    + ); + } + + static buildEventsComponent(events) { + return ; + } +} + +export default ZeroTrustReportFindingsTable; diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustReportPillarGrades.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustReportPillarGrades.js index 125151ea7..e8638d6b1 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustReportPillarGrades.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/ZeroTrustReportPillarGrades.js @@ -23,9 +23,6 @@ export class ZeroTrustReportPillarGrades extends Component { return (
    -

    - Pillars Overview -

    TODO: table with conditional colouring.