From d52788177066c8fb66c732fd5f66d9ccb0eff0f9 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Mon, 4 Jul 2022 13:54:07 +0300 Subject: [PATCH] UI: Fix info pane in AdvancedMultiSelect.js --- .../ui-components/AdvancedMultiSelect.js | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 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 46c7d0fb6..5cf4354b1 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 @@ -33,12 +33,19 @@ class AdvancedMultiSelect extends React.Component { constructor(props) { super(props); + let pluginNames = this.props.value.map(v => v.name); + this.state = { - allPluginNames: this.props.value.map(v => v.name), - masterCheckboxState: this.getMasterCheckboxState(this.props.value.map(v => v.name)), + infoPaneParams: getDefaultPaneParams( + this.props.schema.items.$ref, + this.props.registry, + this.isUnsafeOptionSelected(pluginNames) + ), + allPluginNames: pluginNames, + masterCheckboxState: this.getMasterCheckboxState(pluginNames), pluginDefinitions: getObjectFromRegistryByRef(this.props.schema.items.$ref, this.props.registry).pluginDefs, - selectedPluginNames: this.props.value.map(v => v.name) + selectedPluginNames: pluginNames }; } @@ -173,12 +180,6 @@ class AdvancedMultiSelect extends React.Component { schema } = this.props; - let paneParams = getDefaultPaneParams( - this.props.schema.items.$ref, - this.props.registry, - this.isUnsafeOptionSelected(this.state.selectedPluginNames) - ); - return (
- +
); }