forked from p15670423/monkey
UI: Remove last unused method, improve style
This commit is contained in:
parent
50540da780
commit
fde719ce94
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Form from 'react-jsonschema-form-bs4';
|
import Form from 'react-jsonschema-form-bs4';
|
||||||
import {Button, Col, Modal, Nav} from 'react-bootstrap';
|
import {Col, Nav} from 'react-bootstrap';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import UiSchema from '../configuration-components/UiSchema';
|
import UiSchema from '../configuration-components/UiSchema';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
|
@ -10,7 +10,6 @@ import {formValidationFormats} from '../configuration-components/ValidationForma
|
||||||
import transformErrors from '../configuration-components/ValidationErrorMessages';
|
import transformErrors from '../configuration-components/ValidationErrorMessages';
|
||||||
import UnsafeConfigOptionsConfirmationModal
|
import UnsafeConfigOptionsConfirmationModal
|
||||||
from '../configuration-components/UnsafeConfigOptionsConfirmationModal.js';
|
from '../configuration-components/UnsafeConfigOptionsConfirmationModal.js';
|
||||||
import UnsafeOptionsWarningModal from '../configuration-components/UnsafeOptionsWarningModal.js';
|
|
||||||
import isUnsafeOptionSelected from '../utils/SafeOptionValidator.js';
|
import isUnsafeOptionSelected from '../utils/SafeOptionValidator.js';
|
||||||
import ConfigExportModal from '../configuration-components/ExportConfigModal';
|
import ConfigExportModal from '../configuration-components/ExportConfigModal';
|
||||||
import ConfigImportModal from '../configuration-components/ImportConfigModal';
|
import ConfigImportModal from '../configuration-components/ImportConfigModal';
|
||||||
|
@ -109,10 +108,6 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onUnsafeAttackContinueClick = () => {
|
|
||||||
this.setState({showUnsafeAttackOptionsWarning: false});
|
|
||||||
}
|
|
||||||
|
|
||||||
updateConfig = () => {
|
updateConfig = () => {
|
||||||
this.authFetch(CONFIG_URL)
|
this.authFetch(CONFIG_URL)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
|
@ -228,12 +223,12 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
resetConfig = () => {
|
resetConfig = () => {
|
||||||
this.authFetch(RESET_URL,
|
this.authFetch(RESET_URL,
|
||||||
{
|
{
|
||||||
method: 'POST',
|
method: 'POST'
|
||||||
})
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
lastAction: 'reset',
|
lastAction: 'reset'
|
||||||
});
|
});
|
||||||
this.updateConfig();
|
this.updateConfig();
|
||||||
this.props.onStatusChange();
|
this.props.onStatusChange();
|
||||||
|
|
Loading…
Reference in New Issue