From 8af665c0a8d2cc03f89e92c614397c68c8333a74 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Mon, 13 Jun 2022 16:37:00 +0200 Subject: [PATCH] UI: Use local_ips endpoint to get command_servers --- .../ui/src/components/pages/RunMonkeyPage/RunOptions.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOptions.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOptions.js index bbefb64ac..e09197f14 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOptions.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOptions.js @@ -9,7 +9,7 @@ import {faExpandArrowsAlt} from '@fortawesome/free-solid-svg-icons'; import RunOnIslandButton from './RunOnIslandButton'; import AWSRunButton from './RunOnAWS/AWSRunButton'; -const CONFIG_URL = '/api/configuration/island'; +const LOCAL_IPS_URL = '/api/island/local-ips'; function RunOptions(props) { @@ -21,13 +21,10 @@ function RunOptions(props) { useEffect(() => { if (initialized === false) { - authComponent.authFetch(CONFIG_URL) + authComponent.authFetch(LOCAL_IPS_URL) .then(res => res.json()) .then(res => { - let commandServers = res.configuration.internal.island_server.command_servers; - let ipAddresses = commandServers.map(ip => { - return ip.split(':', 1); - }); + let ipAddresses = res.local_ips; setIps(ipAddresses); setInitialized(true); });