diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js b/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js index e6dbed239..6879bee2e 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js @@ -3,7 +3,7 @@ import PbaInput from './PbaInput'; import {API_PBA_LINUX, API_PBA_WINDOWS} from '../pages/ConfigurePage'; import InfoBox from './InfoBox'; import TextBox from './TextBox'; -import HideInput from '../ui-components/HideInput'; +import SensitiveTextInput from '../ui-components/SensitiveTextInput'; export default function UiSchema(props) { const UiSchema = { @@ -18,7 +18,7 @@ export default function UiSchema(props) { credentials : { exploit_password_list: { items: { - 'ui:widget': HideInput + 'ui:widget': SensitiveTextInput } } } @@ -116,12 +116,12 @@ export default function UiSchema(props) { exploits: { exploit_lm_hash_list:{ items: { - 'ui:widget': HideInput + 'ui:widget': SensitiveTextInput } }, exploit_ntlm_hash_list: { items: { - 'ui:widget': HideInput + 'ui:widget': SensitiveTextInput } } } diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/HideInput.js b/monkey/monkey_island/cc/ui/src/components/ui-components/SensitiveTextInput.js similarity index 79% rename from monkey/monkey_island/cc/ui/src/components/ui-components/HideInput.js rename to monkey/monkey_island/cc/ui/src/components/ui-components/SensitiveTextInput.js index 4a2e53915..6dca37157 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/HideInput.js +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/SensitiveTextInput.js @@ -1,18 +1,16 @@ import React from 'react'; import {InputGroup, FormControl} from 'react-bootstrap'; -import '../../styles/components/HideInput.scss' -class HideInput extends React.PureComponent { +class SensitiveTextInput extends React.PureComponent { constructor(props) { super(props); this.state = { hidden: false }; - this.toggleShow = this.toggleShow.bind(this); } - toggleShow() { + toggleShow = () => { this.setState({hidden: ! this.state.hidden}); } @@ -24,7 +22,7 @@ class HideInput extends React.PureComponent { render() { return (
- +