Fix issues with the handling of VM creation

This commit is contained in:
Pierre HUBERT 2023-10-26 12:15:49 +02:00
parent f5f4239337
commit 9a15fb4f60
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import { VMDetails } from "../widgets/vms/VMDetails";
export function CreateVMRoute(): React.ReactElement {
const snackbar = useSnackbar();
const alert = useAlert();
const navigate = useNavigate();
const [vm] = React.useState(VMInfo.NewEmpty);

View File

@ -60,6 +60,7 @@ function VMDetailsInner(
p.vm.name = v ?? "";
p.onChange?.();
}}
checkValue={(v) => /^[a-zA-Z0-9]+$/.test(v)}
size={ServerApi.Config.constraints.name_size}
/>