forked from p15670423/monkey
Extracted the security issues glance component
This commit is contained in:
parent
cd7cc4011d
commit
785bc4f109
|
@ -1,4 +1,4 @@
|
||||||
import React, {Component} from 'react';
|
import React from 'react';
|
||||||
import {Button, Col} from 'react-bootstrap';
|
import {Button, Col} from 'react-bootstrap';
|
||||||
import BreachedServers from 'components/report-components/security/BreachedServers';
|
import BreachedServers from 'components/report-components/security/BreachedServers';
|
||||||
import ScannedServers from 'components/report-components/security/ScannedServers';
|
import ScannedServers from 'components/report-components/security/ScannedServers';
|
||||||
|
@ -16,11 +16,11 @@ import ReportHeader, {ReportTypes} from "../report-components/common/ReportHeade
|
||||||
import {MonkeysStillAliveWarning} from "../report-components/common/MonkeysStillAliveWarning";
|
import {MonkeysStillAliveWarning} from "../report-components/common/MonkeysStillAliveWarning";
|
||||||
import ReportLoader from "../report-components/common/ReportLoader";
|
import ReportLoader from "../report-components/common/ReportLoader";
|
||||||
import MustRunMonkeyWarning from "../report-components/common/MustRunMonkeyWarning";
|
import MustRunMonkeyWarning from "../report-components/common/MustRunMonkeyWarning";
|
||||||
|
import {SecurityIssuesGlance} from "../report-components/common/SecurityIssuesGlance";
|
||||||
|
|
||||||
let guardicoreLogoImage = require('../../images/guardicore-logo.png');
|
let guardicoreLogoImage = require('../../images/guardicore-logo.png');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ReportPageComponent extends AuthComponent {
|
class ReportPageComponent extends AuthComponent {
|
||||||
|
|
||||||
Issue =
|
Issue =
|
||||||
|
@ -165,17 +165,7 @@ class ReportPageComponent extends AuthComponent {
|
||||||
<h2>
|
<h2>
|
||||||
Overview
|
Overview
|
||||||
</h2>
|
</h2>
|
||||||
{
|
<SecurityIssuesGlance issuesFound={this.state.report.glance.exploited.length > 0}/>
|
||||||
this.state.report.glance.exploited.length > 0 ?
|
|
||||||
(<p className="alert alert-danger">
|
|
||||||
<i className="glyphicon glyphicon-exclamation-sign" style={{'marginRight': '5px'}}/>
|
|
||||||
Critical security issues were detected!
|
|
||||||
</p>) :
|
|
||||||
(<p className="alert alert-success">
|
|
||||||
<i className="glyphicon glyphicon-ok-sign" style={{'marginRight': '5px'}}/>
|
|
||||||
No critical security issues were detected.
|
|
||||||
</p>)
|
|
||||||
}
|
|
||||||
<MonkeysStillAliveWarning allMonkeysAreDead={this.state.allMonkeysAreDead}/>
|
<MonkeysStillAliveWarning allMonkeysAreDead={this.state.allMonkeysAreDead}/>
|
||||||
{
|
{
|
||||||
this.state.report.glance.exploited.length > 0 ?
|
this.state.report.glance.exploited.length > 0 ?
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
import React, {Component, Fragment} from "react";
|
||||||
|
import * as PropTypes from "prop-types";
|
||||||
|
|
||||||
|
export class SecurityIssuesGlance extends Component {
|
||||||
|
render() {
|
||||||
|
return <Fragment>
|
||||||
|
{
|
||||||
|
this.props.issuesFound ?
|
||||||
|
(<p className="alert alert-danger">
|
||||||
|
<i className="glyphicon glyphicon-exclamation-sign" style={{'marginRight': '5px'}}/>
|
||||||
|
Critical security issues were detected!
|
||||||
|
</p>) :
|
||||||
|
(<p className="alert alert-success">
|
||||||
|
<i className="glyphicon glyphicon-ok-sign" style={{'marginRight': '5px'}}/>
|
||||||
|
No critical security issues were detected.
|
||||||
|
</p>)
|
||||||
|
}
|
||||||
|
</Fragment>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SecurityIssuesGlance.propTypes = {issuesFound: PropTypes.bool};
|
Loading…
Reference in New Issue