Balance by fixing a bunch of small eslint and general code hint warnings

This commit is contained in:
Ace Pace 2020-05-01 11:55:25 +03:00
parent 32515e0990
commit 95303309e5
13 changed files with 15 additions and 15 deletions

View File

@ -126,7 +126,7 @@ class AppComponent extends AuthComponent {
<Row>
<Col sm={3} md={2} className='sidebar'>
<div className='header'>
<img 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'/>
</div>
@ -189,7 +189,7 @@ class AppComponent extends AuthComponent {
<hr/>
<div className='guardicore-link text-center' style={{'marginBottom': '0.5em'}}>
<span>Powered by</span>
<a href='http://www.guardicore.com' target='_blank'>
<a href='http://www.guardicore.com' rel="noopener noreferrer" target='_blank'>
<img src={guardicoreLogoImage} alt='GuardiCore'/>
</a>
</div>

View File

@ -49,7 +49,7 @@ class MitigationsComponent extends React.Component {
static getMitigationName(name, url) {
if(url){
return (<a href={url} target={'_blank'}>{name}</a>)
return (<a href={url} rel="noopener noreferrer" target={'_blank'}>{name}</a>)
} else {
return (<p>{name}</p>)
}

View File

@ -21,10 +21,10 @@ class LicensePageComponent extends React.Component {
<p>
Copyright <i className="glyphicon glyphicon-copyright-mark"/> {rainge(2015)} Guardicore Ltd.
<br/>
Licensed under <a href="https://www.gnu.org/licenses/gpl-3.0.html" target="_blank">GPLv3</a>.
Licensed under <a href="https://www.gnu.org/licenses/gpl-3.0.html" rel="noopener noreferrer" target="_blank">GPLv3</a>.
</p>
<p>
The source code is available on <a href="https://github.com/guardicore/monkey" target="_blank">GitHub</a>
The source code is available on <a href="https://github.com/guardicore/monkey" rel="noopener noreferrer" target="_blank">GitHub</a>
</p>
</div>
</Col>

View File

@ -12,7 +12,7 @@ class ConfigurePageComponent extends React.Component{
render(){
return(
<div className={'not-found'}>
<img className={'monkey-detective'} src={monkeyDetective}/>
<img alt="404 monkey image" className={'monkey-detective'} src={monkeyDetective}/>
<div className={'text-block'}>
<h1 className={'not-found-title'}>404</h1>
<h2 className={'not-found-subtitle'}>Page not found</h2>

View File

@ -256,7 +256,7 @@ class RunMonkeyPageComponent extends AuthComponent {
<i className="glyphicon glyphicon-info-sign" style={{'marginRight': '5px'}}/>
Not sure what this is? Not seeing your AWS EC2 instances? <a
href="https://github.com/guardicore/monkey/wiki/Monkey-Island:-Running-the-monkey-on-AWS-EC2-instances"
target="_blank">Read the documentation</a>!
rel="noopener noreferrer" target="_blank">Read the documentation</a>!
</p>
</div>
{

View File

@ -22,7 +22,7 @@ class RunServerPageComponent extends React.Component {
</p>
<p>
To read more about the Monkey, visit <a href="http://infectionmonkey.com"
target="_blank">infectionmonkey.com</a>
rel="noopener noreferrer" target="_blank">infectionmonkey.com</a>
</p>
<p>
Go ahead and <Link to="/run-monkey">run the monkey</Link>.

View File

@ -20,7 +20,7 @@ class ReportMatrixComponent extends React.Component {
}
let tech_type = this.state.schema.properties[type_key];
columns.push({
Header: () => (<a href={tech_type.link} target="_blank">{tech_type.title}</a>),
Header: () => (<a href={tech_type.link} rel="noopener noreferrer" target="_blank">{tech_type.title}</a>),
id: type_key,
accessor: x => this.renderTechnique(x[tech_type.title]),
style: {'whiteSpace': 'unset'}

View File

@ -37,7 +37,7 @@ class SelectedTechnique extends React.Component {
{this.state.techniques[tech_id].title}
</span>
<span>
<a href={this.state.techniques[tech_id].link} target='_blank' className={'link-to-technique'}>
<a href={this.state.techniques[tech_id].link} rel="noopener noreferrer" target='_blank' className={'link-to-technique'}>
<FontAwesomeIcon icon={faQuestionCircle}/>
</a>
</span>

View File

@ -43,7 +43,7 @@ class TechniqueDropdowns extends React.Component{
{this.state.techniques[tech_id].title}
</span>
<span>
<a href={this.state.techniques[tech_id].link} target='_blank' className={'link-to-technique'}>
<a href={this.state.techniques[tech_id].link} rel="noopener noreferrer" target='_blank' className={'link-to-technique'}>
<FontAwesomeIcon icon={faQuestionCircle}/>
</a>
<FontAwesomeIcon icon={this.state.collapseOpen === tech_id ? faChevronDown : faChevronUp}/>

View File

@ -29,7 +29,7 @@ export class ReportHeader extends Component {
</div>
</Col>
<Col xs={4}>
<img src={monkeyLogoImage}
<img alt="monkey logo image" src={monkeyLogoImage}
style={{
float: 'right',
width: '80px'

View File

@ -34,7 +34,7 @@ class VersionComponent extends React.Component {
<div>
<b>Newer version available!</b>
<br/>
<b><a target="_blank" href={this.state.downloadLink}>Download here <FontAwesomeIcon icon={faDownload}/></a></b>
<b><a rel="noopener noreferrer" target="_blank" href={this.state.downloadLink}>Download here <FontAwesomeIcon icon={faDownload}/></a></b>
</div>
:
undefined

View File

@ -83,7 +83,7 @@ class CheckboxComponent extends React.PureComponent {
type='checkbox' value={this.state.checked}
name={this.props.name}/>
<label className='text'>{this.props.children}</label>
<div className='ui-btn-ping' onTransitionEnd={this.stopAnimation}></div>
<div className='ui-btn-ping' onTransitionEnd={this.stopAnimation}/>
</div>
)
}

View File

@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Infection Monkey Island Server</title>