add configuration and start over pages

This commit is contained in:
Barak Argaman 2017-09-17 14:16:57 +03:00
parent eece8dd06d
commit 1081c84d38
4 changed files with 72 additions and 9 deletions

View File

@ -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 {
<Route path="/run-monkey" component={RunMonkeyPage}/>
<Route path="/infection/map" component={MapPage}/>
<Route path="/infection/logs" component={FullLogsPage}/>
{/*<Route path="/report" component={ReportPage}/>*/}
<Route path="/start-over" component={StartOverPage}/>
<Route path="/report" component={ReportPage}/>
</Col>
</Row>
</Grid>

View File

@ -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 {

View File

@ -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 (
<Col xs={8}>
<h1 className="page-title">Penetration Test Report</h1>
<div style={{'fontSize': '1.5em'}}>
<p>
In order to reset the entire environment, all monkeys will be ordered to kill themselves
and the database will be cleaned up.
</p>
<p>
After that you could go back to the <Link to="/run-monkey">Run Monkey</Link> page to start new infections.
</p>
<p>
<a onClick={this.cleanup} className="btn btn-danger">Reset Environment</a>
</p>
</div>
</Col>
);
}
}
export default ReportPageComponent;

View File

@ -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 (
<Col xs={8}>
<h1 className="page-title">Start Over</h1>
<div style={{'fontSize': '1.2em'}}>
<p>
In order to reset the entire environment, all monkeys will be ordered to kill themselves
and the database will be cleaned up.
</p>
<p>
After that you could go back to the <Link to="/run-monkey">Run Monkey</Link> page to start new infections.
</p>
<p>
<a onClick={this.cleanup} className="btn btn-danger btn-lg">Reset Environment</a>
</p>
<p>
* BTW you can just continue and <Link to="/run-monkey">run more monkeys</Link> as you wish,
and see the results on the <Link to="/infection/map">Infection Map</Link> without deleting anything.
</p>
</div>
</Col>
);
}
}
export default StartOverPageComponent;