fix(striker-ui): set higher initial unit for memory and VD size

main
Tsu-ba-me 3 years ago
parent f49dbf73dd
commit c280498d4b
  1. 10
      striker-ui/components/ProvisionServerDialog.tsx

@ -351,6 +351,8 @@ const DATA_SIZE_UNIT_SELECT_ITEMS: SelectItem<DataSizeUnit>[] = [
{ value: 'TB' }, { value: 'TB' },
]; ];
const INITIAL_DATA_SIZE_UNIT: DataSizeUnit = 'GiB';
const createOutlinedSlider = ( const createOutlinedSlider = (
id: string, id: string,
label: string, label: string,
@ -963,7 +965,7 @@ const addVirtualDisk = ({
inputSizeMessage = undefined, inputSizeMessage = undefined,
inputStorageGroupUUID = '', inputStorageGroupUUID = '',
inputStorageGroupUUIDMessage = undefined, inputStorageGroupUUIDMessage = undefined,
inputUnit = 'B', inputUnit = INITIAL_DATA_SIZE_UNIT,
setVirtualDisks, setVirtualDisks,
size = BIGINT_ZERO, size = BIGINT_ZERO,
}: { }: {
@ -1044,7 +1046,9 @@ const ProvisionServerDialog = ({
>(); >();
const [inputMemoryMax, setInputMemoryMax] = useState<string>('0'); const [inputMemoryMax, setInputMemoryMax] = useState<string>('0');
const [inputMemoryValue, setInputMemoryValue] = useState<string>(''); const [inputMemoryValue, setInputMemoryValue] = useState<string>('');
const [inputMemoryUnit, setInputMemoryUnit] = useState<DataSizeUnit>('B'); const [inputMemoryUnit, setInputMemoryUnit] = useState<DataSizeUnit>(
INITIAL_DATA_SIZE_UNIT,
);
const [virtualDisks, setVirtualDisks] = useState<VirtualDiskStates>( const [virtualDisks, setVirtualDisks] = useState<VirtualDiskStates>(
addVirtualDisk(), addVirtualDisk(),
@ -1567,7 +1571,7 @@ const ProvisionServerDialog = ({
disableItem={(value) => value === inputInstallISOFileUUID} disableItem={(value) => value === inputInstallISOFileUUID}
hideItem={(value) => !includeFileUUIDs.includes(value)} hideItem={(value) => !includeFileUUIDs.includes(value)}
id="ps-driver-image" id="ps-driver-image"
label="Driver ISO (optional)" label="Driver ISO"
messageBoxProps={inputDriverISOMessage} messageBoxProps={inputDriverISOMessage}
selectItems={fileSelectItems} selectItems={fileSelectItems}
selectProps={{ selectProps={{

Loading…
Cancel
Save