diff --git a/frontend/src/components/Pages/FrontPage/FrontPage.tsx b/frontend/src/components/Pages/FrontPage/FrontPage.tsx index 3dfc92006..cd756bd8f 100644 --- a/frontend/src/components/Pages/FrontPage/FrontPage.tsx +++ b/frontend/src/components/Pages/FrontPage/FrontPage.tsx @@ -35,8 +35,7 @@ export const refreshInterval = 1000 export function FrontPage() { const refreshInterval = 1000 - const slowRefreshInterval = 5000 - + return ( <>
@@ -49,7 +48,7 @@ export function FrontPage() { - + ) diff --git a/frontend/src/components/Pages/InspectionPage/ScheduleMissionDialog.tsx b/frontend/src/components/Pages/InspectionPage/ScheduleMissionDialog.tsx index e1ac90b01..ec7d2cfb4 100644 --- a/frontend/src/components/Pages/InspectionPage/ScheduleMissionDialog.tsx +++ b/frontend/src/components/Pages/InspectionPage/ScheduleMissionDialog.tsx @@ -45,12 +45,13 @@ export const ScheduleMissionDialog = (props: IProps): JSX.Element => { useEffect(() => { const id = setInterval(() => { - BackendAPICaller.getEnabledRobots().then((robots) => { - setRobotOptions(robots) - }) + BackendAPICaller.getEnabledRobots().then((robots) => robots.filter(robots => robots.currentInstallation.toLowerCase() === installationCode.toLowerCase())) + .then((robots) => { + setRobotOptions(robots) + }) }, props.refreshInterval) return () => clearInterval(id) - }, [props.refreshInterval]) + }, [props.refreshInterval]) let timer: ReturnType @@ -88,42 +89,12 @@ export const ScheduleMissionDialog = (props: IProps): JSX.Element => { - - - - - - - - - - - - - - {TranslateText('This installation has no missions')} - - - - r.name + ' (' + r.model.type + ')'} - options={robotOptions.filter( - (r) => - r.currentInstallation.toLocaleLowerCase() === installationCode.toLocaleLowerCase() - )} + options={robotOptions} label={TranslateText('Select robot')} onOptionsChange={(changes) => onSelectedRobot(changes.selectedItems[0])} autoWidth={true}