diff --git a/monkey/monkey_island/cc/ui/src/components/Main.js b/monkey/monkey_island/cc/ui/src/components/Main.js index 32480db8e..b5fc5f606 100644 --- a/monkey/monkey_island/cc/ui/src/components/Main.js +++ b/monkey/monkey_island/cc/ui/src/components/Main.js @@ -171,6 +171,9 @@ class AppComponent extends AuthComponent { {this.renderRoute('/report/zeroTrust', )} + {this.renderRoute('/report/ransomware', + )} {this.renderRoute('/license', { this.setState({zeroTrustReport: ztReport}) }); + this.setState({ + ransomwareReport: {'report': ''} + }); + // this.authFetch('/api/report/ransomware') + // .then(res => res.json()) + // .then(res => { + // this.setState({ + // ransomwareReport: res + // }); + // }); } } @@ -144,6 +157,8 @@ class ReportPageComponent extends AuthComponent { return (); case 'zeroTrust': return (); + case 'ransomware': + return (); } } diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/RansomwareReport.js b/monkey/monkey_island/cc/ui/src/components/report-components/RansomwareReport.js new file mode 100644 index 000000000..31629fbf0 --- /dev/null +++ b/monkey/monkey_island/cc/ui/src/components/report-components/RansomwareReport.js @@ -0,0 +1,45 @@ +import React from 'react'; + +import ReportHeader, {ReportTypes} from './common/ReportHeader'; +import ReportLoader from './common/ReportLoader'; + +class RansomwareReport extends React.Component { + + constructor(props) { + super(props); + this.state = { + report: props.report + }; + } + + stillLoadingDataFromServer() { + return Object.keys(this.state.report).length === 0; + } + + generateReportContent() { + return ( +
+

+ This report shows information about the ransomware simulation run by Infection Monkey. +

+
+ ) + } + + render() { + let content = {}; + if (this.stillLoadingDataFromServer()) { + content = ; + } else { + content =
{this.generateReportContent()}
; + } + return ( +
+ +
+ {content} +
) + } +} + +export default RansomwareReport; diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/common/ReportHeader.js b/monkey/monkey_island/cc/ui/src/components/report-components/common/ReportHeader.js index d942a53e2..6e7c25d2e 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/common/ReportHeader.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/common/ReportHeader.js @@ -8,6 +8,7 @@ export const ReportTypes = { zeroTrust: 'Zero Trust', security: 'Security', attack: 'ATT&CK', + ransomware: 'Ransomware', null: '' };