From af329d56d826a5092cb3a2535bf0de65bd14600f Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 8 Jan 2021 16:18:24 -0500 Subject: [PATCH] ui: Factor MasterCheckbox() out of AdvancedMultiSelect --- .../ui-components/AdvancedMultiSelect.js | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js b/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js index 38e52271e..b875a6426 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js @@ -42,6 +42,27 @@ function getDefaultPaneParams(refString, registry) { return ({title: configSection.title, content: configSection.description}); } +function MasterCheckbox(props) { + const { + title, + value, + disabled, + onClick, + checkboxState + } = props; + + return ( + + + {title} + + ); +} + class AdvancedMultiSelect extends React.Component { constructor(props) { super(props) @@ -69,6 +90,7 @@ class AdvancedMultiSelect extends React.Component { let definitionObj = getFullDefinitionByKey(refString, registry, itemKey); this.setState({infoPaneParams: {title: definitionObj.title, content: definitionObj.info, link: definitionObj.link}}); } + render() { const { schema, @@ -88,14 +110,9 @@ class AdvancedMultiSelect extends React.Component { const selectValue = cloneDeep(value); return (
- - - {schema.title} - +