-
- If you are finished and want to start over with a fresh configuration, erase the logs and clear the map
- you can go ahead and
-
-
- {
- this.setState({showCleanDialog: true});
- this.updateMonkeysRunning();
- }
- }>
- Reset the Environment
-
-
-
-
- You don't have to reset the environment to keep running monkeys.
- You can continue and Run More Monkeys as you wish,
- and see the results on the Infection Map without deleting anything.
-
- {this.state.cleaned ?
-
-
- Environment was reset successfully
-
- : ''}
-
-
- );
- }
-
- cleanup = () => {
- this.setState({
- cleaned: false
- });
- return this.authFetch('/api?action=reset')
- .then(res => res.json())
- .then(res => {
- if (res['status'] === 'OK') {
- this.setState({
- cleaned: true
- });
- }
- }).then(() => {
- this.updateMonkeysRunning();
- this.props.onStatusChange();
- });
- };
-
- closeModal = () => {
- this.setState({
- showCleanDialog: false
- })
- };
-}
-
-export default ResetPageComponent;
diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.js b/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.js
deleted file mode 100644
index 8639e46a3..000000000
--- a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.js
+++ /dev/null
@@ -1,76 +0,0 @@
-import {Modal} from 'react-bootstrap';
-import React from 'react';
-import {GridLoader} from 'react-spinners';
-import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
-import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons/faExclamationTriangle';
-
-
-class IslandResetModal extends React.PureComponent {
-
- constructor(props) {
- super(props);
-
- this.state = {
- showCleanDialog: this.props.showCleanDialog,
- allMonkeysAreDead: this.props.allMonkeysAreDead,
- loading: false
- };
- }
-
- componentDidUpdate(prevProps) {
- if (this.props !== prevProps) {
- this.setState({ showCleanDialog: this.props.showCleanDialog,
- allMonkeysAreDead: this.props.allMonkeysAreDead})
- }
- }
-
- render = () => {
- return (
-