Show VM settings in grid
This commit is contained in:
parent
674f9fe7ed
commit
fcf66e3e93
@ -1,16 +1,16 @@
|
||||
import { Button, Grid, Paper, Typography } from "@mui/material";
|
||||
import React, { PropsWithChildren } from "react";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { VMApi, VMInfo } from "../api/VMApi";
|
||||
import { useSnackbar } from "../hooks/providers/SnackbarProvider";
|
||||
import { VirtWebRouteContainer } from "../widgets/VirtWebRouteContainer";
|
||||
import { Button, Paper, Typography } from "@mui/material";
|
||||
import { TextInput } from "../widgets/forms/TextInput";
|
||||
import { ServerApi } from "../api/ServerApi";
|
||||
import { validate as validateUUID } from "uuid";
|
||||
import { SelectInput } from "../widgets/forms/SelectInput";
|
||||
import { CheckboxInput } from "../widgets/forms/CheckboxInput";
|
||||
import { ServerApi } from "../api/ServerApi";
|
||||
import { VMApi, VMInfo } from "../api/VMApi";
|
||||
import { useAlert } from "../hooks/providers/AlertDialogProvider";
|
||||
import { useSnackbar } from "../hooks/providers/SnackbarProvider";
|
||||
import { AsyncWidget } from "../widgets/AsyncWidget";
|
||||
import { VirtWebRouteContainer } from "../widgets/VirtWebRouteContainer";
|
||||
import { CheckboxInput } from "../widgets/forms/CheckboxInput";
|
||||
import { SelectInput } from "../widgets/forms/SelectInput";
|
||||
import { TextInput } from "../widgets/forms/TextInput";
|
||||
|
||||
export function CreateVMRoute(): React.ReactElement {
|
||||
const snackbar = useSnackbar();
|
||||
@ -126,6 +126,7 @@ function EditVMInner(p: {
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Grid container spacing={2}>
|
||||
{/* Metadata section */}
|
||||
<EditSection title="Metadata">
|
||||
<TextInput
|
||||
@ -230,6 +231,7 @@ function EditVMInner(p: {
|
||||
}}
|
||||
/>
|
||||
</EditSection>
|
||||
</Grid>
|
||||
</VirtWebRouteContainer>
|
||||
);
|
||||
}
|
||||
@ -238,11 +240,13 @@ function EditSection(
|
||||
p: { title: string } & PropsWithChildren
|
||||
): React.ReactElement {
|
||||
return (
|
||||
<Grid item sm={12} md={6}>
|
||||
<Paper style={{ margin: "10px", padding: "10px" }}>
|
||||
<Typography variant="h5" style={{ marginBottom: "15px" }}>
|
||||
{p.title}
|
||||
</Typography>
|
||||
{p.children}
|
||||
</Paper>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user