forked from p15670423/monkey
UI: Fix submit config when nothing is changed on Ransomware and Network
Tabs
This commit is contained in:
parent
ed2ebc79c3
commit
8ee3ab4317
|
@ -11,7 +11,7 @@ BASIC_NETWORK = {
|
|||
"properties": {
|
||||
"info_box": {
|
||||
"title": "",
|
||||
"type": "object",
|
||||
"type": "text",
|
||||
"info": 'The Monkey scans its subnet if "Local network scan" is checked. '
|
||||
'Additionally, the Monkey scans machines according to "Scan '
|
||||
'target list".',
|
||||
|
|
|
@ -24,7 +24,7 @@ RANSOMWARE = {
|
|||
},
|
||||
"info_box": {
|
||||
"title": "",
|
||||
"type": "object",
|
||||
"type": "text",
|
||||
"info": "No files will be encrypted if a directory is not specified or doesn't "
|
||||
"exist on a victim machine.",
|
||||
},
|
||||
|
@ -52,11 +52,10 @@ RANSOMWARE = {
|
|||
},
|
||||
},
|
||||
},
|
||||
"readme_note": {
|
||||
"text_box": {
|
||||
"title": "",
|
||||
"type": "object",
|
||||
"description": "Note: A README.txt will be left in the specified target "
|
||||
"directory.",
|
||||
"type": "text",
|
||||
"text": "Note: A README.txt will be left in the specified target " "directory.",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import * as React from 'react';
|
||||
|
||||
class TextBox extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<p>{this.props.schema.text} </p>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TextBox;
|
|
@ -2,6 +2,7 @@ import AdvancedMultiSelect from '../ui-components/AdvancedMultiSelect';
|
|||
import PbaInput from './PbaInput';
|
||||
import {API_PBA_LINUX, API_PBA_WINDOWS} from '../pages/ConfigurePage';
|
||||
import InfoBox from './InfoBox';
|
||||
import TextBox from './TextBox';
|
||||
|
||||
export default function UiSchema(props) {
|
||||
const UiSchema = {
|
||||
|
@ -79,6 +80,9 @@ export default function UiSchema(props) {
|
|||
directories: {
|
||||
// Directory inputs are dynamically hidden
|
||||
},
|
||||
text_box: {
|
||||
'ui:field': TextBox
|
||||
},
|
||||
enabled: {'ui:widget': 'hidden'}
|
||||
},
|
||||
other_behaviors : {'ui:widget': 'hidden'}
|
||||
|
|
|
@ -58,7 +58,7 @@ class ConfigurePageComponent extends AuthComponent {
|
|||
}
|
||||
|
||||
getSectionsOrder() {
|
||||
let islandMode = this.props.islandMode ? this.props.islandMode : 'advanced'
|
||||
let islandMode = 'advanced'
|
||||
return CONFIGURATION_TABS_PER_MODE[islandMode];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue