From c47ef80aac7acd5f5cdcb4d0ea305cf688b89ee3 Mon Sep 17 00:00:00 2001 From: Yann Stepienik Date: Fri, 7 Apr 2023 15:54:47 +0100 Subject: [PATCH] v0.1.12 Quick fix --- client/src/pages/config/users/containerPicker.jsx | 9 ++++++++- client/src/pages/config/users/proxyman.jsx | 1 + client/src/pages/config/users/routeman.jsx | 5 ++++- package.json | 2 +- src/utils/types.go | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/client/src/pages/config/users/containerPicker.jsx b/client/src/pages/config/users/containerPicker.jsx index 596fb7f..813c479 100644 --- a/client/src/pages/config/users/containerPicker.jsx +++ b/client/src/pages/config/users/containerPicker.jsx @@ -31,7 +31,7 @@ import CircularProgress from '@mui/material/CircularProgress'; import * as API from '../../../api'; -export function CosmosContainerPicker({formik, lockTarget, TargetContainer}) { +export function CosmosContainerPicker({formik, lockTarget, TargetContainer, onTargetChange}) { const [open, setOpen] = React.useState(false); const [containers, setContainers] = React.useState([]); const [hasPublicPorts, setHasPublicPorts] = React.useState(false); @@ -134,6 +134,13 @@ export function CosmosContainerPicker({formik, lockTarget, TargetContainer}) { } }, [open]); + const newTarget = formik.values[name]; + React.useEffect(() => { + if(onTargetChange) { + onTargetChange(newTarget) + } + }, [newTarget]) + return ( {label} diff --git a/client/src/pages/config/users/proxyman.jsx b/client/src/pages/config/users/proxyman.jsx index d478430..a31baf2 100644 --- a/client/src/pages/config/users/proxyman.jsx +++ b/client/src/pages/config/users/proxyman.jsx @@ -143,6 +143,7 @@ const ProxyManagement = () => { {routes && routes.map((route,key) => (<> { + console.log(newRoute) routes[key] = newRoute; setNeedSave(true); }} diff --git a/client/src/pages/config/users/routeman.jsx b/client/src/pages/config/users/routeman.jsx index 223d72e..9782107 100644 --- a/client/src/pages/config/users/routeman.jsx +++ b/client/src/pages/config/users/routeman.jsx @@ -148,8 +148,11 @@ const RouteManagement = ({ routeConfig, TargetContainer, noControls=false, lockT (formik.values.Mode === "SERVAPP")? { + setRouteConfig(formik.values); + }} /> :