Can configure network autostart

This commit is contained in:
2023-12-06 19:10:25 +01:00
parent 23f2029deb
commit 8b53875349
7 changed files with 143 additions and 22 deletions

View File

@ -3,16 +3,16 @@ import React from "react";
import { validate as validateUUID } from "uuid";
import { IsoFile, IsoFilesApi } from "../../api/IsoFilesApi";
import { ServerApi } from "../../api/ServerApi";
import { VMInfo } from "../../api/VMApi";
import { VMApi, VMInfo } from "../../api/VMApi";
import { AsyncWidget } from "../AsyncWidget";
import { CheckboxInput } from "../forms/CheckboxInput";
import { EditSection } from "../forms/EditSection";
import { SelectInput } from "../forms/SelectInput";
import { TextInput } from "../forms/TextInput";
import { VMAutostartInput } from "../forms/VMAutostartInput";
import { VMDisksList } from "../forms/VMDisksList";
import { VMSelectIsoInput } from "../forms/VMSelectIsoInput";
import { VMScreenshot } from "./VMScreenshot";
import { ResAutostartInput } from "../forms/ResAutostartInput";
interface DetailsProps {
vm: VMInfo;
@ -156,7 +156,14 @@ function VMDetailsInner(
}}
/>
{p.vm.uuid && <VMAutostartInput editable={p.editable} vm={p.vm} />}
{p.vm.uuid && (
<ResAutostartInput
editable={p.editable}
ressourceName="VM"
checkAutotostart={() => VMApi.IsAutostart(p.vm)}
setAutotostart={(e) => VMApi.SetAutostart(p.vm, e)}
/>
)}
</EditSection>
{/* Storage section */}