From f543b9d9ae01252e42e5ddb141e83ad37ce0dbe9 Mon Sep 17 00:00:00 2001 From: gokhangunduz Date: Fri, 16 Feb 2024 11:11:24 +0300 Subject: [PATCH] feat(version): release 0.34.9 version --- Dockerfile | 2 +- package.json | 3 +-- src/components/CFDevMode/CFDevMode.tsx | 4 +++- src/components/CreateForms/CFStep1.tsx | 4 ++-- src/contexts/FormContext.tsx | 10 +++++----- src/providers/PrivateProvider.tsx | 15 +++++++++++++-- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12352b37..29df29bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ WORKDIR /app RUN npm install -s RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build RUN rm -rf /app/build/static/js/*.map -FROM nginx:stable-alpine-slim as production-stage +FROM nginx:alpine as production-stage COPY --from=build-stage /app/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build-stage /app/build /usr/share/nginx/html EXPOSE 80 \ No newline at end of file diff --git a/package.json b/package.json index 34ae4d37..cf18be8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "0.34.8", + "version": "0.34.9", "private": true, "scripts": { "dev": "GENERATE_SOURCEMAP=false react-scripts start", @@ -46,7 +46,6 @@ "formik": "^2.2.9", "gridstack": "^7.2.3", "jwt-decode": "^4.0.0", - "keycloak-js": "^21.0.1", "primeicons": "^6.0.1", "primereact": "^9.1.1", "query-string": "^8.1.0", diff --git a/src/components/CFDevMode/CFDevMode.tsx b/src/components/CFDevMode/CFDevMode.tsx index e090ce2c..5397948f 100644 --- a/src/components/CFDevMode/CFDevMode.tsx +++ b/src/components/CFDevMode/CFDevMode.tsx @@ -19,7 +19,9 @@ export default function CFDevMode({ dataTut="create-robot-step1-development-mode" disabled={formik.isSubmitting || isImportRobot} checked={formik?.values?.details.isDevelopmentMode} - onChange={(e: any) => formik.setFieldValue("isDevelopmentMode", e)} + onChange={(e: any) => + formik.setFieldValue("details.isDevelopmentMode", e) + } /> ); } diff --git a/src/components/CreateForms/CFStep1.tsx b/src/components/CreateForms/CFStep1.tsx index a046ae62..a883155c 100644 --- a/src/components/CreateForms/CFStep1.tsx +++ b/src/components/CreateForms/CFStep1.tsx @@ -51,7 +51,7 @@ export default function CFStep1({ isImportRobot }: ICFStep1): ReactElement { step1: formik.values, }); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [formik.values]); + }, [formik?.values]); useEffect(() => { if (formik.values.details.isVirtualRobot) { @@ -59,7 +59,7 @@ export default function CFStep1({ isImportRobot }: ICFStep1): ReactElement { } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [formik.values.details.isVirtualRobot]); + }, [formik?.values.details.isVirtualRobot]); return ( diff --git a/src/contexts/FormContext.tsx b/src/contexts/FormContext.tsx index 753bd143..e32cade9 100644 --- a/src/contexts/FormContext.tsx +++ b/src/contexts/FormContext.tsx @@ -37,11 +37,11 @@ export default ({ children }: any) => { const url = useParams(); - const step1Fromik = useFormik({ + const step1Formik = useFormik({ validationSchema: CFRobotStep1Validations, initialValues: robotData?.step1, onSubmit: async () => { - step1Fromik.setSubmitting(true); + step1Formik.setSubmitting(true); if (url?.robotName) { await updateRobotFC(); @@ -56,11 +56,11 @@ export default ({ children }: any) => { selectedState?.instance?.name }/${selectedState?.fleet?.name}/${robotData?.step1?.details?.name}}`; }, 2000); - } else if (!step1Fromik.values?.details?.isVirtualRobot) { + } else if (!step1Formik.values?.details?.isVirtualRobot) { addPhysicalInstanceToFleetFC(); } - step1Fromik.setSubmitting(false); + step1Formik.setSubmitting(false); handleCreateRobotNextStep(); }, }); @@ -274,7 +274,7 @@ export default ({ children }: any) => { return ( } @@ -26,7 +37,7 @@ export default function PrivateProvider(): ReactElement { initOptions={{ useNonce: true, onLoad: "login-required", - checkLoginIframe: false, + checkLoginIframe: true, prompt: "none", }} >