UI: Add WarningBox

This commit is contained in:
Kekoa Kaaikala 2022-09-28 17:40:56 +00:00
parent 8a96598d10
commit 05e9c2af62
2 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import AdvancedMultiSelect from '../ui-components/AdvancedMultiSelect';
import InfoBox from './InfoBox';
import TextBox from './TextBox.js';
import WarningBox from './WarningBox';
import PbaInput from './PbaInput';
import { API_PBA_LINUX, API_PBA_WINDOWS } from '../pages/ConfigurePage';
import SensitiveTextInput from '../ui-components/SensitiveTextInput';
@ -60,9 +61,6 @@ export default function UiSchema(props) {
},
network_scan: {
targets: {
info_box_general: {
'ui:field': InfoBox
},
blocked_ips: {
items: {
classNames: 'config-template-no-header'
@ -74,7 +72,7 @@ export default function UiSchema(props) {
}
},
info_box_scan_my_networks: {
'ui:field': InfoBox
'ui:field': WarningBox
},
subnets: {
items: {

View File

@ -0,0 +1,17 @@
import * as React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons/faExclamationTriangle';
class WarningBox extends React.Component {
render() {
return (
<div className='alert alert-info'>
<FontAwesomeIcon icon={faExclamationTriangle} style={{ 'marginRight': '5px' }} />
{this.props.schema.info}
</div>
);
}
}
export default WarningBox;