diff --git a/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py b/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py index 4b1251aae..e287c8998 100644 --- a/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py +++ b/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py @@ -120,7 +120,7 @@ class MonkeyIslandClient(object): assert False def _reset_island_mode(self): - if self.requests.post("api/island-mode", data='{"mode": "unset"}').ok: + if self.requests.post("api/island/mode", data='{"mode": "unset"}').ok: LOGGER.info("Resseting island mode after the test.") else: LOGGER.error("Failed to reset island mode") diff --git a/monkey/monkey_island/cc/resources/island_mode.py b/monkey/monkey_island/cc/resources/island_mode.py index 84f30c4ce..047320306 100644 --- a/monkey/monkey_island/cc/resources/island_mode.py +++ b/monkey/monkey_island/cc/resources/island_mode.py @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) class IslandMode(AbstractResource): - urls = ["/api/island-mode"] + urls = ["/api/island/mode"] def __init__(self, island_mode_service: IslandModeService): self._island_mode_service = island_mode_service diff --git a/monkey/monkey_island/cc/ui/src/components/Main.tsx b/monkey/monkey_island/cc/ui/src/components/Main.tsx index 4a4370294..d65c71a67 100644 --- a/monkey/monkey_island/cc/ui/src/components/Main.tsx +++ b/monkey/monkey_island/cc/ui/src/components/Main.tsx @@ -113,7 +113,7 @@ class AppComponent extends AuthComponent { }; setMode = () => { - return IslandHttpClient.get('/api/island-mode') + return IslandHttpClient.get('/api/island/mode') .then(res => { this.setState({islandMode: res.body.mode}); }); diff --git a/monkey/monkey_island/cc/ui/src/components/pages/LandingPage.tsx b/monkey/monkey_island/cc/ui/src/components/pages/LandingPage.tsx index d95a84dfe..8f89189ec 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/LandingPage.tsx +++ b/monkey/monkey_island/cc/ui/src/components/pages/LandingPage.tsx @@ -74,7 +74,7 @@ const LandingPageComponent = (props: Props) => { } function setScenario(scenario: string) { - IslandHttpClient.post('/api/island-mode', {'mode': scenario}) + IslandHttpClient.post('/api/island/mode', {'mode': scenario}) .then(() => { props.onStatusChange(); }); diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx b/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx index 639ee2c19..9717bb079 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/IslandResetModal.tsx @@ -113,7 +113,7 @@ const IslandResetModal = (props: Props) => { }}) .then(res => { if (res.status === 200) { - return auth.authFetch('/api/island-mode', {method: 'POST', body: '{"mode": "unset"}'}) + return auth.authFetch('/api/island/mode', {method: 'POST', body: '{"mode": "unset"}'}) }}) .then(res => { if (res.status !== 200) {