diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js index a741148fb..afb8afafb 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js @@ -13,6 +13,8 @@ import {Link} from 'react-router-dom'; import AuthComponent from '../AuthComponent'; import AwsRunTable from '../run-monkey/AwsRunTable'; +import MissingBinariesModal from '../ui-components/MissingBinariesModal'; + import '../../styles/MonkeyRunPage.scss'; const loading_css_override = css` @@ -40,8 +42,12 @@ class RunMonkeyPageComponent extends AuthComponent { awsMachines: [], isLoadingAws: true, isErrorWhileCollectingAwsMachines: false, - awsMachineCollectionErrorMsg: '' + awsMachineCollectionErrorMsg: '', + showModal: false, + errorDetails: '' }; + + this.closeModal = this.closeModal.bind(this); } componentDidMount() { @@ -130,6 +136,13 @@ class RunMonkeyPageComponent extends AuthComponent { runningOnIslandState: 'installing' }); } else { + /* If Monkey binaries are missing, change the state accordingly */ + if (res['error_text'].startsWith('Copy file failed')) { + this.setState({ + showModal: true, + errorDetails: res['error_text']} + ); + } this.setState({ runningOnIslandState: 'not_running' }); @@ -285,6 +298,12 @@ class RunMonkeyPageComponent extends AuthComponent { ) } + closeModal = () => { + this.setState({ + showModal: false + }) + }; + render() { return (
+
+
+ Some Monkey binaries are not found where they should be...
+
+
+ You can download the files from here,
+ at the bottommost section titled "Assets", and place them under the directory monkey/monkey_island/cc/binaries
.
+
+
+ Error Details
+
+
+ {this.state.errorDetails}
+
+