diff --git a/src/ic/confirm-command.js b/src/ic/confirm-command.js
new file mode 100644
index 0000000..43b6885
--- /dev/null
+++ b/src/ic/confirm-command.js
@@ -0,0 +1,48 @@
+/**
+ * This file is part of VILLASweb.
+ *
+ * VILLASweb is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * VILLASweb is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with VILLASweb. If not, see .
+ ******************************************************************************/
+
+import React from 'react';
+import { Button, Modal} from 'react-bootstrap';
+
+class ConfirmCommand extends React.Component {
+ onModalKeyPress = (event) => {
+ if (event.key === 'Enter') {
+ event.preventDefault();
+
+ this.props.onClose(false);
+ }
+ }
+
+ render() {
+ return this.props.onClose(false)} onKeyPress={this.onModalKeyPress}>
+
+ Confirm {this.props.command}
+
+
+
+ Are you sure you want to {this.props.command} '{this.props.name}'?
+
+
+
+
+
+
+ ;
+ }
+}
+
+export default ConfirmCommand;
diff --git a/src/ic/ic-dialog.js b/src/ic/ic-dialog.js
index 12f65ec..0acbcb5 100644
--- a/src/ic/ic-dialog.js
+++ b/src/ic/ic-dialog.js
@@ -3,6 +3,7 @@ import {FormLabel, Button} from 'react-bootstrap';
import Dialog from '../common/dialogs/dialog';
import {Collapse} from 'react-collapse';
import Icon from "../common/icon";
+import ConfirmCommand from './confirm-command';
@@ -13,6 +14,8 @@ class ICDialog extends React.Component {
super(props);
this.state = {
+ confirmCommand: false,
+ command: '',
};
}
@@ -33,6 +36,15 @@ class ICDialog extends React.Component {
console.log("graph error");
}
+ closeConfirmModal(canceled){
+ if(!canceled){
+ this.props.sendControlCommand(this.state.command);
+ }
+
+ this.setState({confirmCommand: false, command: ''});
+ }
+
+
render() {
let objectURL=''
@@ -91,7 +103,15 @@ class ICDialog extends React.Component {
)}
+
+