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 8ca334e73..afb8afafb 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js @@ -43,7 +43,8 @@ class RunMonkeyPageComponent extends AuthComponent { isLoadingAws: true, isErrorWhileCollectingAwsMachines: false, awsMachineCollectionErrorMsg: '', - showModal: false + showModal: false, + errorDetails: '' }; this.closeModal = this.closeModal.bind(this); @@ -138,7 +139,8 @@ class RunMonkeyPageComponent extends AuthComponent { /* If Monkey binaries are missing, change the state accordingly */ if (res['error_text'].startsWith('Copy file failed')) { this.setState({ - showModal: true} + showModal: true, + errorDetails: res['error_text']} ); } this.setState({ @@ -320,7 +322,7 @@ class RunMonkeyPageComponent extends AuthComponent { + errorDetails = {this.state.errorDetails}/> { // TODO: implement button functionality /* diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/MissingBinariesModal.js b/monkey/monkey_island/cc/ui/src/components/ui-components/MissingBinariesModal.js index afd1ff0de..b09774c2e 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/MissingBinariesModal.js +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/MissingBinariesModal.js @@ -9,22 +9,44 @@ class MissingBinariesModal extends React.PureComponent { super(props); this.state = { - showModal: this.props.showModal + showModal: this.props.showModal, + errorDetails: this.props.errorDetails }; } + componentDidUpdate(prevProps) { + if (this.props !== prevProps) { + this.setState({ + showModal: this.props.showModal, + errorDetails: this.props.errorDetails + }) + } + } + render = () => { return ( - this.props.onClose()}> + this.props.onClose()}>

Uh oh...

-

- Some Monkey binaries are not found where they should be...{"\r\n"} - Try downloading them from here, - at the bottommost section titled "Assets". -

+
+

+ + Some Monkey binaries are not found where they should be...
+ Try downloading them from here, + at the bottommost section titled "Assets". +

+
+
+

+ Error Details +

+
+
+              {this.state.errorDetails}
+            
+