fix(striker-ui): identify required fields for input tests in provision server

main
Tsu-ba-me 1 year ago
parent d89f687e85
commit 331c961995
  1. 8
      striker-ui/components/ProvisionServerDialog.tsx

@ -1007,6 +1007,7 @@ const ProvisionServerDialog = ({
}, },
value: inputServerNameValue, value: inputServerNameValue,
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -1051,6 +1052,7 @@ const ProvisionServerDialog = ({
}, },
value: inputCPUCoresValue, value: inputCPUCoresValue,
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -1083,6 +1085,7 @@ const ProvisionServerDialog = ({
}, },
value: memory, value: memory,
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -1108,6 +1111,7 @@ const ProvisionServerDialog = ({
}, },
value: inputInstallISOFileUUID, value: inputInstallISOFileUUID,
}, },
isRequired: true,
tests: [{ test: testNotBlank }], tests: [{ test: testNotBlank }],
}, },
anvil: { anvil: {
@ -1117,6 +1121,7 @@ const ProvisionServerDialog = ({
}, },
value: inputAnvilValue, value: inputAnvilValue,
}, },
isRequired: true,
tests: [{ test: testNotBlank }], tests: [{ test: testNotBlank }],
}, },
optimizeForOS: { optimizeForOS: {
@ -1126,6 +1131,7 @@ const ProvisionServerDialog = ({
}, },
value: inputOptimizeForOSValue?.key, value: inputOptimizeForOSValue?.key,
}, },
isRequired: true,
tests: [{ test: testNotBlank }], tests: [{ test: testNotBlank }],
}, },
}; };
@ -1141,6 +1147,7 @@ const ProvisionServerDialog = ({
}, },
value: virtualDisks.sizes[vdIndex], value: virtualDisks.sizes[vdIndex],
}, },
isRequired: true,
onFinishBatch: () => { onFinishBatch: () => {
setVirtualDisks({ ...virtualDisks }); setVirtualDisks({ ...virtualDisks });
}, },
@ -1173,6 +1180,7 @@ const ProvisionServerDialog = ({
}, },
value: virtualDisks.inputStorageGroupUUIDs[vdIndex], value: virtualDisks.inputStorageGroupUUIDs[vdIndex],
}, },
isRequired: true,
onFinishBatch: () => { onFinishBatch: () => {
setVirtualDisks({ ...virtualDisks }); setVirtualDisks({ ...virtualDisks });
}, },

Loading…
Cancel
Save