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 4963aca7c..0dc813dc6 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 @@ -44,7 +44,7 @@ class AdvancedMultiSelect extends React.Component { infoPaneParams: getDefaultPaneParams( this.infoPaneRefString, this.registry, - this.unsafeOptionsSelected(this.props.value) + this.isUnsafeOptionSelected(this.props.value) ) }; } @@ -71,7 +71,7 @@ class AdvancedMultiSelect extends React.Component { this.props.onChange(newValues); this.setMasterCheckboxState(newValues); this.setHideResetState(newValues); - this.setPaneInfoToDefault(this.unsafeOptionsSelected(newValues)); + this.setPaneInfoToDefault(this.isUnsafeOptionSelected(newValues)); } onChildCheckboxClick = (value) => { @@ -115,7 +115,7 @@ class AdvancedMultiSelect extends React.Component { this.props.onChange(this.defaultValues); this.setHideResetState(this.defaultValues); this.setMasterCheckboxState(this.defaultValues); - this.setPaneInfoToDefault(this.unsafeOptionsSelected(this.defaultValues)); + this.setPaneInfoToDefault(this.isUnsafeOptionSelected(this.defaultValues)); } setHideResetState(selectValues) { @@ -125,10 +125,10 @@ class AdvancedMultiSelect extends React.Component { } getHideResetState(selectValues) { - return !(this.unsafeOptionsSelected(selectValues)) + return !(this.isUnsafeOptionSelected(selectValues)) } - unsafeOptionsSelected(selectValues) { + isUnsafeOptionSelected(selectValues) { return !(selectValues.every((value) => this.isSafe(value))); } @@ -150,12 +150,12 @@ class AdvancedMultiSelect extends React.Component { ); } - setPaneInfoToDefault(unsafeOptionsSelected) { + setPaneInfoToDefault(isUnsafeOptionSelected) { this.setState(() => ({ infoPaneParams: getDefaultPaneParams( this.props.schema.items.$ref, this.props.registry, - unsafeOptionsSelected + isUnsafeOptionSelected ) })); } diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js b/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js index 902646068..e6476d3a2 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js @@ -12,13 +12,13 @@ const WarningType = { MULTIPLE: 2 } -function getDefaultPaneParams(refString, registry, unsafeOptionsSelected) { +function getDefaultPaneParams(refString, registry, isUnsafeOptionSelected) { let configSection = getObjectFromRegistryByRef(refString, registry); return ( { title: configSection.title, content: configSection.description, - warningType: unsafeOptionsSelected ? WarningType.Multiple : WarningType.NONE + warningType: isUnsafeOptionSelected ? WarningType.Multiple : WarningType.NONE }); }