From e4e2948941f051a36a91ab2f09464557d96f511e Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Tue, 16 Apr 2019 19:20:24 +0300 Subject: [PATCH] Loading now stops if not on AWS --- monkey/monkey_island/cc/ui/package.json | 3 ++- .../monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/package.json b/monkey/monkey_island/cc/ui/package.json index 1f9f10c57..b69707349 100644 --- a/monkey/monkey_island/cc/ui/package.json +++ b/monkey/monkey_island/cc/ui/package.json @@ -92,6 +92,7 @@ "react-toggle": "^4.0.1", "redux": "^4.0.0", "sha3": "^2.0.0", - "react-spinners": "^0.5.4" + "react-spinners": "^0.5.4", + "@emotion/core": "^10.0.10" } } 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 b03575c43..e9b2744a4 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js @@ -1,4 +1,5 @@ import React from 'react'; +import { css } from '@emotion/core'; import {Button, Col, Well, Nav, NavItem, Collapse, Form, FormControl, FormGroup} from 'react-bootstrap'; import CopyToClipboard from 'react-copy-to-clipboard'; import GridLoader from 'react-spinners/GridLoader'; @@ -92,6 +93,8 @@ class RunMonkeyPageComponent extends AuthComponent { } else { this.setState({isOnAws: true, awsMachines: res['instances'], isAwsAuth: res['auth'], isLoadingAws: false}); } + } else { + this.setState({isOnAws: false, isLoadingAws: false}); } }); }