Loading portal-gui/src/app/components/CreateProfileModal/CreateProfileModal.tsx +12 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,17 @@ const initialForm = (): FormState => ({ }); function generateUUID(): string { if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") { return crypto.randomUUID(); } return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { const r = (Math.random() * 16) | 0; const v = c === "x" ? r : (r & 0x3) | 0x8; return v.toString(16); }); } const packageTypeOptions = ["HELM", "CONTAINER", "QCOW2", "OVA"].map((v) => ({ label: v, value: v })); const repoTypeOptions = ["PUBLICREPO", "PRIVATEREPO"].map((v) => ({ label: v, value: v })); const protocolOptions = ["TCP", "UDP", "ANY"].map((v) => ({ label: v, value: v })); Loading Loading @@ -202,7 +213,7 @@ export const CreateProfileModal = ({ open, onClose, onCreated }: Props) => { setSubmitting(true); const appId = crypto.randomUUID(); const appId = generateUUID(); const body: Record<string, unknown> = { appId, Loading Loading
portal-gui/src/app/components/CreateProfileModal/CreateProfileModal.tsx +12 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,17 @@ const initialForm = (): FormState => ({ }); function generateUUID(): string { if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") { return crypto.randomUUID(); } return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { const r = (Math.random() * 16) | 0; const v = c === "x" ? r : (r & 0x3) | 0x8; return v.toString(16); }); } const packageTypeOptions = ["HELM", "CONTAINER", "QCOW2", "OVA"].map((v) => ({ label: v, value: v })); const repoTypeOptions = ["PUBLICREPO", "PRIVATEREPO"].map((v) => ({ label: v, value: v })); const protocolOptions = ["TCP", "UDP", "ANY"].map((v) => ({ label: v, value: v })); Loading Loading @@ -202,7 +213,7 @@ export const CreateProfileModal = ({ open, onClose, onCreated }: Props) => { setSubmitting(true); const appId = crypto.randomUUID(); const appId = generateUUID(); const body: Record<string, unknown> = { appId, Loading