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 index 040bac420..aa2e325c4 100644 --- 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 @@ -1,5 +1,6 @@ import React, {Component} from "react"; import ReactTable from "react-table"; +import {Button, Modal} from "react-bootstrap"; class PillarLabel extends Component { render() { @@ -7,12 +8,72 @@ class PillarLabel extends Component { } } +class EventsModal extends Component { + constructor(props) { + super(props); + } + + render() { + return ( +
+ this.props.hideCallback()}> + +

Events

+ +
{JSON.stringify(this.props.events)}
+ +
+ +
+
+
+
+ ); + } +} + + +class EventsAndButtonComponent extends Component { + constructor(props) { + super(props); + this.state = { + show: false + } + } + + hide = () => { + this.setState({show: false}); + }; + + show = () => { + this.setState({show: true}); + }; + + render() { + return ( +
+ +

+ +

+
+ ); + } + +} + const columns = [ { Header: 'Findings', columns: [ { Header: 'Test', accessor: 'test', - style: {'white-space': 'unset'} // This enables word wrap + style: {'whiteSpace': 'unset'} // This enables word wrap }, { Header: 'Pillars', id: "pillars", accessor: x => { @@ -23,7 +84,11 @@ const columns = [ return } }, - { Header: 'Events', id:"events", accessor: x => ZeroTrustReportFindingsTable.buildEventsComponent(x)} + { Header: 'Events', id:"events", + accessor: x => { + return ; + } + } ] } ]; @@ -46,10 +111,7 @@ class ZeroTrustReportFindingsTable extends Component { ); } - - static buildEventsComponent(events) { - return ; - } } + export default ZeroTrustReportFindingsTable;