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