fixes from feedbacks

This commit is contained in:
Rajaa
2023-02-14 16:26:16 +01:00
parent 4b218e5ee2
commit ffff7e7762
2 changed files with 16 additions and 21 deletions

View File

@@ -161,13 +161,7 @@ const EsxiImport = decorate([
<Row>
<LabelCol>{_('sslCertificate')}</LabelCol>
<InputCol>
<input
checked={hasCertificate}
name='hasCertificate'
onChange={toggleCertificateCheck}
required
type='checkbox'
/>
<input checked={hasCertificate} name='hasCertificate' onChange={toggleCertificateCheck} type='checkbox' />
</InputCol>
</Row>
<div className='form-group pull-right'>

View File

@@ -44,19 +44,20 @@ const XvaImport = decorate([
provideState({
initialState: getInitialState,
effects: {
handleImport: () => {
const { sr, vms } = this.state
return importVms(
mapPlus(vms, (vm, push) => {
if (!vm.error) {
push({
...vm,
})
}
}),
sr
)
},
handleImport:
() =>
({ sr, vms }) => {
return importVms(
mapPlus(vms, (vm, push) => {
if (!vm.error) {
push({
...vm,
})
}
}),
sr
)
},
onChangePool: (_, pool) => ({ pool, sr: pool.default_SR }),
onChangeSr: (_, sr) => ({ sr }),
onChangeVmData: (_, data, vmIndex) => {
@@ -65,7 +66,7 @@ const XvaImport = decorate([
vms[vmIndex].data = { ...previousData, ...data }
return { vms }
},
onDrop: async files => {
onDrop: async (_, files) => {
const vms = await Promise.all(
mapPlus(files, (file, push) => {
const { name } = file