Skip to content

Commit

Permalink
feat(version): release 0.34.9 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Feb 16, 2024
1 parent c56c7b8 commit f543b9d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.34.8",
"version": "0.34.9",
"private": true,
"scripts": {
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/components/CFDevMode/CFDevMode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
/>
);
}
4 changes: 2 additions & 2 deletions src/components/CreateForms/CFStep1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ 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) {
formik.setFieldValue("tree.physicalInstance.name", "");
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [formik.values.details.isVirtualRobot]);
}, [formik?.values.details.isVirtualRobot]);

return (
<Fragment>
Expand Down
10 changes: 5 additions & 5 deletions src/contexts/FormContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export default ({ children }: any) => {

const url = useParams();

const step1Fromik = useFormik<IEnvironmentStep1>({
const step1Formik = useFormik<IEnvironmentStep1>({
validationSchema: CFRobotStep1Validations,
initialValues: robotData?.step1,
onSubmit: async () => {
step1Fromik.setSubmitting(true);
step1Formik.setSubmitting(true);

if (url?.robotName) {
await updateRobotFC();
Expand All @@ -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();
},
});
Expand Down Expand Up @@ -274,7 +274,7 @@ export default ({ children }: any) => {
return (
<FormContext.Provider
value={{
step1Fromik,
step1Formik,
step1AppFormik,
step2Formik,
step3Formik,
Expand Down
15 changes: 13 additions & 2 deletions src/providers/PrivateProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@ import { ReactKeycloakProvider } from "@react-keycloak/web";
import FunctionsContext from "../contexts/FunctionsContext";
import GithubContext from "../contexts/GithubContext";
import MainContext from "../contexts/MainContext";
import keycloak from "../api/keycloak";
import { jwtDecode } from "jwt-decode";
import { ReactElement } from "react";
import Keycloak from "keycloak-js";
import {
envKeycloakAuthURL,
envKeycloakClientID,
envKeycloakRealm,
} from "../helpers/envProvider";

export default function PrivateProvider(): ReactElement {
const keycloak = new Keycloak({
url: envKeycloakAuthURL,
realm: envKeycloakRealm,
clientId: envKeycloakClientID,
});

return (
<ReactKeycloakProvider
LoadingComponent={<KeycloakLoadingPage />}
Expand All @@ -26,7 +37,7 @@ export default function PrivateProvider(): ReactElement {
initOptions={{
useNonce: true,
onLoad: "login-required",
checkLoginIframe: false,
checkLoginIframe: true,
prompt: "none",
}}
>
Expand Down

0 comments on commit f543b9d

Please sign in to comment.