F OpenNebula/one#3951: Add oneflow features (#381)

This commit is contained in:
Sergio Betanzos authored and GitHub committed 2020-10-30 14:59:35 +01:00
1 parent 311c4d14ae
commit 28e5491797
5 files changed
+18 -6

No files matched your search

@@ -14,6 +14,14 @@ const SHUTDOWN_ACTIONS = [
]
export const FORM_FIELDS = [
{
name: 'registration_time',
type: INPUT_TYPES.TEXT,
htmlType: INPUT_TYPES.HIDDEN,
validation: yup
.number()
.default(undefined)
},
{
name: 'name',
label: 'Name',
@@ -65,6 +73,12 @@ export const FORM_FIELDS = [
'Wait for VM/containers to finish their boot process to report that they are READY and allow children tiers to spawn',
type: INPUT_TYPES.CHECKBOX,
validation: yup.boolean().default(false)
},
{
name: 'automatic_deletion',
label: 'Automatic delete service if all tiers are terminated',
type: INPUT_TYPES.CHECKBOX,
validation: yup.boolean().default(false)
}
]
@@ -27,7 +27,7 @@ const ID = {
name: 'id',
label: 'ID',
type: INPUT_TYPES.TEXT,
htmlType: 'hidden',
htmlType: INPUT_TYPES.HIDDEN,
validation: yup
.string()
.uuid()
@@ -10,7 +10,7 @@ export const ID = {
name: 'id',
label: 'ID',
type: INPUT_TYPES.TEXT,
htmlType: 'hidden',
htmlType: INPUT_TYPES.HIDDEN,
validation: yup
.string()
.trim()
@@ -17,8 +17,6 @@ const Form = ({ onBack, onSubmit, resolver, fields, error, isLoading, transition
const defaultValues = resolver.default()
const classes = loginStyles()
console.log(defaultValues)
const { handleSubmit, setError, ...methods } = useForm({
reValidateMode: 'onSubmit',
defaultValues,
@@ -9,7 +9,7 @@ const mapNetworkToUserInput = network => {
const mandatoryValue = mandatory ? 'M' : 'O'
const descriptionValue = description ?? ''
const idVnetValue = idVnet ?? ''
const extraValue = `:${extra}` ?? ''
const extraValue = `:${extra ?? ''}`
return `${mandatoryValue}|network|${descriptionValue}| |${type}:${idVnetValue}${extraValue}`
}
@@ -28,7 +28,7 @@ const mapTiersToRoles = (tiers, networking, cluster) =>
return [...res, networkString]
}, [])
?.join('')
?.concat(`SCHED_REQUIREMENTS = "ClUSTER_ID="${cluster}""`)
?.concat(`SCHED_REQUIREMENTS = "ClUSTER_ID=\\"${cluster}\\""`)
const parentsValue = parents?.reduce((res, id) => {
const parent = tiers.find(t => t.id === id)