Update Side NavBar

Removed a useless step from the process, added link to documentation
This commit is contained in:
Shay Nehmad 2020-08-04 15:03:55 +03:00
parent 7403bf14fa
commit 86364ddb8c
1 changed files with 18 additions and 20 deletions

View File

@ -1,12 +1,13 @@
import logoImage from '../images/monkey-icon.svg'; import React from 'react';
import infectionMonkeyImage from '../images/infection-monkey.svg';
import {NavLink} from 'react-router-dom'; import {NavLink} from 'react-router-dom';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck'; import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck';
import {faUndo} from '@fortawesome/free-solid-svg-icons/faUndo'; import {faUndo} from '@fortawesome/free-solid-svg-icons/faUndo';
import {faExternalLinkAlt} from '@fortawesome/free-solid-svg-icons';
import guardicoreLogoImage from '../images/guardicore-logo.png'; import guardicoreLogoImage from '../images/guardicore-logo.png';
import logoImage from '../images/monkey-icon.svg';
import infectionMonkeyImage from '../images/infection-monkey.svg';
import VersionComponent from './side-menu/VersionComponent'; import VersionComponent from './side-menu/VersionComponent';
import React from 'react';
class SideNavComponent extends React.Component { class SideNavComponent extends React.Component {
@ -14,24 +15,17 @@ class SideNavComponent extends React.Component {
render() { render() {
return ( return (
<> <>
<NavLink to={'/'} exact={true}>
<div className='header'> <div className='header'>
<img alt='logo' src={logoImage} style={{width: '5vw', margin: '15px'}}/> <img alt='logo' 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> </div>
</NavLink>
<ul className='navigation'> <ul className='navigation'>
<li>
<NavLink to='/' exact={true}>
<span className='number'>1.</span>
Run Monkey Island Server
{this.props.completedSteps.run_server ?
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark'/>
: ''}
</NavLink>
</li>
<li> <li>
<NavLink to='/run-monkey'> <NavLink to='/run-monkey'>
<span className='number'>2.</span> <span className='number'>1.</span>
Run Monkey Run Monkey
{this.props.completedSteps.run_monkey ? {this.props.completedSteps.run_monkey ?
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark'/> <FontAwesomeIcon icon={faCheck} className='pull-right checkmark'/>
@ -40,7 +34,7 @@ class SideNavComponent extends React.Component {
</li> </li>
<li> <li>
<NavLink to='/infection/map'> <NavLink to='/infection/map'>
<span className='number'>3.</span> <span className='number'>2.</span>
Infection Map Infection Map
{this.props.completedSteps.infection_done ? {this.props.completedSteps.infection_done ?
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark'/> <FontAwesomeIcon icon={faCheck} className='pull-right checkmark'/>
@ -54,7 +48,7 @@ class SideNavComponent extends React.Component {
|| location.pathname === '/report/zeroTrust' || location.pathname === '/report/zeroTrust'
|| location.pathname === '/report/security') || location.pathname === '/report/security')
}}> }}>
<span className='number'>4.</span> <span className='number'>3.</span>
Security Reports Security Reports
{this.props.completedSteps.report_done ? {this.props.completedSteps.report_done ?
<FontAwesomeIcon icon={faCheck} className='pull-right checkmark'/> <FontAwesomeIcon icon={faCheck} className='pull-right checkmark'/>
@ -72,7 +66,7 @@ class SideNavComponent extends React.Component {
<hr/> <hr/>
<ul> <ul>
<li><NavLink to='/configure'>Configuration</NavLink></li> <li><NavLink to='/configure'>Configuration</NavLink></li>
<li><NavLink to='/infection/telemetry'>Log</NavLink></li> <li><NavLink to='/infection/telemetry'>Logs</NavLink></li>
</ul> </ul>
<hr/> <hr/>
@ -83,6 +77,10 @@ class SideNavComponent extends React.Component {
</a> </a>
</div> </div>
<div className='license-link text-center'> <div className='license-link text-center'>
<a href='https://www.guardicore.com/infectionmonkey/docs' rel="noopener noreferrer" target="_blank">
<FontAwesomeIcon icon={faExternalLinkAlt} /> Documentation
</a>
<br/>
<NavLink to='/license'>License</NavLink> <NavLink to='/license'>License</NavLink>
</div> </div>
<VersionComponent/> <VersionComponent/>