Skip to content

Commit 94bf91c

Browse files
authored
Merge pull request #1286 from guardicore/ransomware-config-ui-description
Ransomware config UI description
2 parents 01b9c41 + e1263ec commit 94bf91c

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

monkey/monkey_island/cc/services/config_schema/ransomware.py

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
RANSOMWARE = {
22
"title": "Ransomware",
33
"type": "object",
4+
"description": "This page allows you to configure the Infection Monkey to execute a ransomware "
5+
"simulation. The Infection Monkey is capable of simulating a ransomware attack on your network "
6+
"using a set of configurable behaviors. A number of precautions have been taken to ensure that "
7+
"this ransomware simulation is safe for production environments.\n\nFor more information about "
8+
"configuring the ransomware simulation, see "
9+
'<a href="https://guardicore.com/infectionmonkey/docs/usage/use-cases/ransomware-simulation" '
10+
'target="_blank"> the documentation</a>.',
411
"properties": {
512
"encryption": {
613
"title": "Encryption",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
3+
function HtmlFieldDescription(props) {
4+
var content_obj = {__html: props.description};
5+
return <p id={props.id} className='field-description' dangerouslySetInnerHTML={content_obj} />;
6+
}
7+
8+
export default HtmlFieldDescription;

monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import isUnsafeOptionSelected from '../utils/SafeOptionValidator.js';
1717
import ConfigExportModal from '../configuration-components/ExportConfigModal';
1818
import ConfigImportModal from '../configuration-components/ImportConfigModal';
1919
import applyUiSchemaManipulators from '../configuration-components/UISchemaManipulators.tsx';
20+
import HtmlFieldDescription from '../configuration-components/HtmlFieldDescription.js';
2021

2122
const ATTACK_URL = '/api/attack';
2223
const CONFIG_URL = '/api/configuration/island';
@@ -411,6 +412,7 @@ class ConfigurePageComponent extends AuthComponent {
411412
setPbaFilenameLinux: this.setPbaFilenameLinux,
412413
selectedSection: this.state.selectedSection
413414
})
415+
formProperties['fields'] = {DescriptionField: HtmlFieldDescription};
414416
formProperties['formData'] = this.state.currentFormData;
415417
formProperties['onChange'] = this.onChange;
416418
formProperties['customFormats'] = formValidationFormats;

0 commit comments

Comments
 (0)