This commit is contained in:
@ -35,14 +35,16 @@ interface DetailsProps {
|
||||
}
|
||||
|
||||
export function VMDetails(p: DetailsProps): React.ReactElement {
|
||||
const [groupsList, setGroupsList] = React.useState<string[] | any>();
|
||||
const [isoList, setIsoList] = React.useState<IsoFile[] | any>();
|
||||
const [groupsList, setGroupsList] = React.useState<string[] | undefined>();
|
||||
const [isoList, setIsoList] = React.useState<IsoFile[] | undefined>();
|
||||
const [vcpuCombinations, setVCPUCombinations] = React.useState<
|
||||
number[] | any
|
||||
number[] | undefined
|
||||
>();
|
||||
const [networksList, setNetworksList] = React.useState<
|
||||
NetworkInfo[] | undefined
|
||||
>();
|
||||
const [networksList, setNetworksList] = React.useState<NetworkInfo[] | any>();
|
||||
const [networkFiltersList, setNetworkFiltersList] = React.useState<
|
||||
NWFilter[] | any
|
||||
NWFilter[] | undefined
|
||||
>();
|
||||
|
||||
const load = async () => {
|
||||
@ -60,11 +62,11 @@ export function VMDetails(p: DetailsProps): React.ReactElement {
|
||||
errMsg="Failed to load the list of ISO files"
|
||||
build={() => (
|
||||
<VMDetailsInner
|
||||
groupsList={groupsList}
|
||||
isoList={isoList}
|
||||
vcpuCombinations={vcpuCombinations}
|
||||
networksList={networksList}
|
||||
networkFiltersList={networkFiltersList}
|
||||
groupsList={groupsList!}
|
||||
isoList={isoList!}
|
||||
vcpuCombinations={vcpuCombinations!}
|
||||
networksList={networksList!}
|
||||
networkFiltersList={networkFiltersList!}
|
||||
{...p}
|
||||
/>
|
||||
)}
|
||||
@ -202,7 +204,7 @@ function VMDetailsTabGeneral(p: DetailsInnerProps): React.ReactElement {
|
||||
editable={p.editable}
|
||||
label="Group"
|
||||
onValueChange={(v) => {
|
||||
p.vm.group = v! as any;
|
||||
p.vm.group = v!;
|
||||
p.onChange?.();
|
||||
}}
|
||||
value={p.vm.group}
|
||||
@ -222,7 +224,11 @@ function VMDetailsTabGeneral(p: DetailsInnerProps): React.ReactElement {
|
||||
: "Add a new group instead of using existing one"
|
||||
}
|
||||
>
|
||||
<IconButton onClick={() => { setAddGroup(!addGroup); }}>
|
||||
<IconButton
|
||||
onClick={() => {
|
||||
setAddGroup(!addGroup);
|
||||
}}
|
||||
>
|
||||
{addGroup ? <ListIcon /> : <AddIcon />}
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
Reference in New Issue
Block a user