From 1081c84d388bf442641b2c260cd5e97ad189b044 Mon Sep 17 00:00:00 2001 From: Barak Argaman Date: Sun, 17 Sep 2017 14:16:57 +0300 Subject: [PATCH] add configuration and start over pages --- monkey_island/cc/ui/src/components/Main.js | 5 ++- .../ui/src/components/pages/FullLogsPage.js | 10 ++---- .../cc/ui/src/components/pages/ReportPage.js | 31 ++++++++++++++++ .../ui/src/components/pages/StartOverPage.js | 35 +++++++++++++++++++ 4 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 monkey_island/cc/ui/src/components/pages/ReportPage.js create mode 100644 monkey_island/cc/ui/src/components/pages/StartOverPage.js diff --git a/monkey_island/cc/ui/src/components/Main.js b/monkey_island/cc/ui/src/components/Main.js index 598f0e1a6..a8e19a51f 100644 --- a/monkey_island/cc/ui/src/components/Main.js +++ b/monkey_island/cc/ui/src/components/Main.js @@ -8,6 +8,8 @@ import ConfigurePage from 'components/pages/ConfigurePage'; import RunMonkeyPage from 'components/pages/RunMonkeyPage'; import MapPage from 'components/pages/MapPage'; import FullLogsPage from 'components/pages/FullLogsPage'; +import StartOverPage from 'components/pages/StartOverPage'; +import ReportPage from 'components/pages/ReportPage'; require('normalize.css/normalize.css'); require('react-data-components/css/table-twbs.css'); @@ -82,7 +84,8 @@ class AppComponent extends React.Component { - {/**/} + + diff --git a/monkey_island/cc/ui/src/components/pages/FullLogsPage.js b/monkey_island/cc/ui/src/components/pages/FullLogsPage.js index ed78470da..64a649816 100644 --- a/monkey_island/cc/ui/src/components/pages/FullLogsPage.js +++ b/monkey_island/cc/ui/src/components/pages/FullLogsPage.js @@ -8,15 +8,9 @@ const renderTime = (val) => val.split('.')[0]; const columns = [ { title: 'Time', prop: 'timestamp', render: renderTime}, -<<<<<<< HEAD - { title: 'Monkey ID', prop: 'monkey_guid' }, - { title: 'Type', prop: 'telem_type' }, - { title: 'More Info', prop: 'data', render: renderJson, width: '40%' } -======= - { title: 'Monkey', prop: 'monkey' }, - { title: 'Type', prop: 'telem_type' }, + { title: 'Monkey', prop: 'monkey'}, + { title: 'Type', prop: 'telem_type'}, { title: 'Details', prop: 'data', render: renderJson, width: '40%' } ->>>>>>> e37a0a98630fdd673166aa7d149031db577946cd ]; class FullLogsPageComponent extends React.Component { diff --git a/monkey_island/cc/ui/src/components/pages/ReportPage.js b/monkey_island/cc/ui/src/components/pages/ReportPage.js new file mode 100644 index 000000000..25ea4f939 --- /dev/null +++ b/monkey_island/cc/ui/src/components/pages/ReportPage.js @@ -0,0 +1,31 @@ +import React from 'react'; +import {Col} from 'react-bootstrap'; +import {Link} from 'react-router-dom'; + +class ReportPageComponent extends React.Component { + constructor(props) { + super(props); + } + + render() { + return ( + +

Penetration Test Report

+
+

+ In order to reset the entire environment, all monkeys will be ordered to kill themselves + and the database will be cleaned up. +

+

+ After that you could go back to the Run Monkey page to start new infections. +

+

+ Reset Environment +

+
+ + ); + } +} + +export default ReportPageComponent; diff --git a/monkey_island/cc/ui/src/components/pages/StartOverPage.js b/monkey_island/cc/ui/src/components/pages/StartOverPage.js new file mode 100644 index 000000000..bcad07527 --- /dev/null +++ b/monkey_island/cc/ui/src/components/pages/StartOverPage.js @@ -0,0 +1,35 @@ +import React from 'react'; +import {Col} from 'react-bootstrap'; +import {Link} from 'react-router-dom'; + +class StartOverPageComponent extends React.Component { + constructor(props) { + super(props); + } + + render() { + return ( + +

Start Over

+
+

+ In order to reset the entire environment, all monkeys will be ordered to kill themselves + and the database will be cleaned up. +

+

+ After that you could go back to the Run Monkey page to start new infections. +

+

+ Reset Environment +

+

+ * BTW you can just continue and run more monkeys as you wish, + and see the results on the Infection Map without deleting anything. +

+
+ + ); + } +} + +export default StartOverPageComponent;