diff --git a/frontend/src/pages/create-environment-page/index.tsx b/frontend/src/pages/create-environment-page/index.tsx index f6fa9561..5105f20e 100644 --- a/frontend/src/pages/create-environment-page/index.tsx +++ b/frontend/src/pages/create-environment-page/index.tsx @@ -2,7 +2,7 @@ import { useEffect } from "react"; import { zodResolver } from "@hookform/resolvers/zod"; import { useNavigate } from "react-router-dom"; import { useForm, Controller } from "react-hook-form"; -import { useOSFamily } from "../../hooks"; +import { useOSFamily, useEnvironmentMetadata } from "../../hooks"; import { createAppBarConfig } from "../../utils"; import { z } from "zod"; import { Select } from "../../components"; @@ -17,6 +17,8 @@ const schema = z.object({ memory: z.string(), java: z.string(), jmh: z.string(), + jvm: z.string(), + systemArch: z.string(), }); type EnvironmentFormData = z.infer; @@ -26,6 +28,8 @@ const inputClasses = const CreateEnvironment = () => { const { data: osFamilyOptions } = useOSFamily(); + const { data: archOptions } = useEnvironmentMetadata("arch"); + const { data: jvmNameOptions } = useEnvironmentMetadata("jvmName"); const { handleSubmit, register, control } = useForm({ mode: "all", resolver: zodResolver(schema), @@ -43,6 +47,8 @@ const CreateEnvironment = () => { cores, osName, osVersion, + jvm, + systemArch, } = data; const payload = { @@ -50,10 +56,12 @@ const CreateEnvironment = () => { osVersion: osVersion, name: infraName, description: infraDescription, - systemMemoryReadable: memory, + systemMemory: Number(memory), jmhVersion: jmh, jvmVersion: java, systemProcessors: Number(cores), + systemArch: systemArch, + jvmName: jvm, }; await saveEnvironment(payload).then(() => navigate("/environments")); }; @@ -151,6 +159,24 @@ const CreateEnvironment = () => { /> +
+
Jvm Name
+
+ ( + name} + labelExtractor={(label) => label } + onChange={(e) => field.onChange(e)} + /> + )} + /> +
+
JMH