"" to '' fixes for travis
This commit is contained in:
parent
ce0b15d801
commit
9dc8749550
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import {BrowserRouter as Router, NavLink, Redirect, Route, Switch, withRouter} from 'react-router-dom';
|
||||
import {BrowserRouter as Router, NavLink, Redirect, Route, Switch} from 'react-router-dom';
|
||||
import {Col, Grid, Row} from 'react-bootstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faCheck, faUndo } from '@fortawesome/free-solid-svg-icons'
|
||||
|
@ -11,7 +11,6 @@ import MapPage from 'components/pages/MapPage';
|
|||
import TelemetryPage from 'components/pages/TelemetryPage';
|
||||
import StartOverPage from 'components/pages/StartOverPage';
|
||||
import ReportPage from 'components/pages/ReportPage';
|
||||
import ZeroTrustReportPage from 'components/report-components/ZeroTrustReport';
|
||||
import LicensePage from 'components/pages/LicensePage';
|
||||
import AuthComponent from 'components/AuthComponent';
|
||||
import LoginPageComponent from 'components/pages/LoginPage';
|
||||
|
@ -84,7 +83,7 @@ class AppComponent extends AuthComponent {
|
|||
};
|
||||
|
||||
redirectTo = (userPath, targetPath) => {
|
||||
let pathQuery = new RegExp(userPath+"[\/]?$", "g");
|
||||
let pathQuery = new RegExp(userPath+'[\/]?$', 'g');
|
||||
if(window.location.pathname.match(pathQuery)){
|
||||
return <Redirect to={{pathname: targetPath}}/>
|
||||
}
|
||||
|
@ -123,57 +122,57 @@ class AppComponent extends AuthComponent {
|
|||
<Router>
|
||||
<Grid fluid={true}>
|
||||
<Row>
|
||||
<Col sm={3} md={2} className="sidebar">
|
||||
<div className="header">
|
||||
<Col sm={3} md={2} className='sidebar'>
|
||||
<div className='header'>
|
||||
<img src={logoImage} style={{width: '5vw', margin: '15px'}}/>
|
||||
<img src={infectionMonkeyImage} style={{width: '15vw'}} alt="Infection Monkey"/>
|
||||
<img src={infectionMonkeyImage} style={{width: '15vw'}} alt='Infection Monkey'/>
|
||||
</div>
|
||||
|
||||
<ul className="navigation">
|
||||
<ul className='navigation'>
|
||||
<li>
|
||||
<NavLink to="/" exact={true}>
|
||||
<span className="number">1.</span>
|
||||
<NavLink to='/' exact={true}>
|
||||
<span className='number'>1.</span>
|
||||
Run Monkey Island Server
|
||||
{this.state.completedSteps.run_server ?
|
||||
<FontAwesomeIcon icon={faCheck} className="pull-right checkmark text-success"/>
|
||||
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark text-success'/>
|
||||
: ''}
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink to="/run-monkey">
|
||||
<span className="number">2.</span>
|
||||
<NavLink to='/run-monkey'>
|
||||
<span className='number'>2.</span>
|
||||
Run Monkey
|
||||
{this.state.completedSteps.run_monkey ?
|
||||
<FontAwesomeIcon icon={faCheck} className="pull-right checkmark text-success"/>
|
||||
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark text-success'/>
|
||||
: ''}
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink to="/infection/map">
|
||||
<span className="number">3.</span>
|
||||
<NavLink to='/infection/map'>
|
||||
<span className='number'>3.</span>
|
||||
Infection Map
|
||||
{this.state.completedSteps.infection_done ?
|
||||
<FontAwesomeIcon icon={faCheck} className="pull-right checkmark text-success"/>
|
||||
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark text-success'/>
|
||||
: ''}
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink to="/report/security"
|
||||
<NavLink to='/report/security'
|
||||
isActive={(match, location) => {
|
||||
return (location.pathname === '/report/attack'
|
||||
|| location.pathname === '/report/zeroTrust'
|
||||
|| location.pathname === '/report/security')
|
||||
}}>
|
||||
<span className="number">4.</span>
|
||||
<span className='number'>4.</span>
|
||||
Security Reports
|
||||
{this.state.completedSteps.report_done ?
|
||||
<FontAwesomeIcon icon={faCheck} className="pull-right checkmark text-success"/>
|
||||
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark text-success'/>
|
||||
: ''}
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink to="/start-over">
|
||||
<span className="number"><FontAwesomeIcon icon={faUndo} style={{'marginLeft': '-1px'}}/></span>
|
||||
<NavLink to='/start-over'>
|
||||
<span className='number'><FontAwesomeIcon icon={faUndo} style={{'marginLeft': '-1px'}}/></span>
|
||||
Start Over
|
||||
</NavLink>
|
||||
</li>
|
||||
|
@ -181,23 +180,23 @@ class AppComponent extends AuthComponent {
|
|||
|
||||
<hr/>
|
||||
<ul>
|
||||
<li><NavLink to="/configure">Configuration</NavLink></li>
|
||||
<li><NavLink to="/infection/telemetry">Log</NavLink></li>
|
||||
<li><NavLink to='/configure'>Configuration</NavLink></li>
|
||||
<li><NavLink to='/infection/telemetry'>Log</NavLink></li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
<div className="guardicore-link text-center" style={{'marginBottom': '0.5em'}}>
|
||||
<div className='guardicore-link text-center' style={{'marginBottom': '0.5em'}}>
|
||||
<span>Powered by</span>
|
||||
<a href="http://www.guardicore.com" target="_blank">
|
||||
<img src={guardicoreLogoImage} alt="GuardiCore"/>
|
||||
<a href='http://www.guardicore.com' target='_blank'>
|
||||
<img src={guardicoreLogoImage} alt='GuardiCore'/>
|
||||
</a>
|
||||
</div>
|
||||
<div className="license-link text-center">
|
||||
<NavLink to="/license">License</NavLink>
|
||||
<div className='license-link text-center'>
|
||||
<NavLink to='/license'>License</NavLink>
|
||||
</div>
|
||||
<VersionComponent/>
|
||||
</Col>
|
||||
<Col sm={9} md={10} smOffset={3} mdOffset={2} className="main">
|
||||
<Col sm={9} md={10} smOffset={3} mdOffset={2} className='main'>
|
||||
<Route path='/login' render={() => (<LoginPageComponent onStatusChange={this.updateStatus}/>)}/>
|
||||
{this.renderRoute('/', <RunServerPage onStatusChange={this.updateStatus}/>, true)}
|
||||
{this.renderRoute('/configure', <ConfigurePage onStatusChange={this.updateStatus}/>)}
|
||||
|
|
|
@ -15,7 +15,7 @@ import ReportLoader from './common/ReportLoader';
|
|||
const techComponents = getAllAttackModules();
|
||||
|
||||
function getAllAttackModules() {
|
||||
let context = require.context("../attack/techniques/", false, /\.js$/);
|
||||
let context = require.context('../attack/techniques/', false, /\.js$/);
|
||||
let obj = {};
|
||||
context.keys().forEach(function (key) {
|
||||
let techName = key.replace(/\.js/, '');
|
||||
|
@ -68,11 +68,11 @@ class AttackReport extends React.Component {
|
|||
static getStatusIcon(tech_id, techniques){
|
||||
switch (techniques[tech_id].status){
|
||||
case ScanStatus.SCANNED:
|
||||
return <FontAwesomeIcon icon={faEye} className={"technique-status-icon"}/>;
|
||||
return <FontAwesomeIcon icon={faEye} className={'technique-status-icon'}/>;
|
||||
case ScanStatus.USED:
|
||||
return <FontAwesomeIcon icon={faRadiation} className={"technique-status-icon"}/>;
|
||||
return <FontAwesomeIcon icon={faRadiation} className={'technique-status-icon'}/>;
|
||||
default:
|
||||
return <FontAwesomeIcon icon={faEyeSlash} className={"technique-status-icon"}/>;
|
||||
return <FontAwesomeIcon icon={faEyeSlash} className={'technique-status-icon'}/>;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,8 +112,8 @@ class TechniqueDropdowns extends React.Component{
|
|||
className={classNames({'toggle-btn': true,
|
||||
'toggled-off' : this.state.techniquesHidden,
|
||||
'toggled-on': !this.state.techniquesHidden})}>
|
||||
<FontAwesomeIcon icon={faToggleOn} className={'switch-on'} size={"2x"}/>
|
||||
<FontAwesomeIcon icon={faToggleOn} className={'switch-off'} size={"2x"}/>
|
||||
<FontAwesomeIcon icon={faToggleOn} className={'switch-on'} size={'2x'}/>
|
||||
<FontAwesomeIcon icon={faToggleOn} className={'switch-off'} size={'2x'}/>
|
||||
</Button>
|
||||
</h3>
|
||||
<section className={`dropdown-list ${listClass}`}>{content}</section>
|
||||
|
|
Loading…
Reference in New Issue