Set deploy-as-is to default on VMware (#777)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Nicolas Vazquez 2020-10-12 07:02:33 -03:00 committed by Rohit Yadav
parent 9a73c3eaf9
commit 308dcf63c3
1 changed files with 3 additions and 55 deletions

View File

@ -198,13 +198,6 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="12" v-if="hyperVMWShow && currentForm === 'Create' && deployAsIsSupported">
<a-col :md="24" :lg="12">
<a-form-item :label="$t('label.deployasis')">
<a-switch v-decorator="['deployasis']" @change="handleChangeDeployAsIs" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="12" v-if="allowed && hyperXenServerShow">
<a-form-item v-if="hyperXenServerShow" :label="$t('label.xenservertoolsversion61plus')">
<a-switch
@ -234,43 +227,6 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="24" :lg="12" v-if="hyperVMWShow && !deployAsIsSelected">
<a-form-item :label="$t('label.rootdiskcontrollertype')">
<a-select
v-decorator="['rootDiskControllerType', {
rules: [
{
required: false,
message: `${this.$t('message.error.select')}`
}
]
}]"
:loading="rootDisk.loading"
:placeholder="$t('label.rootdiskcontrollertype')">
<a-select-option v-for="opt in rootDisk.opts" :key="opt.id">
{{ opt.name || opt.description }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="24" :lg="12" v-if="hyperVMWShow && !deployAsIsSelected">
<a-form-item :label="$t('label.nicadaptertype')">
<a-select
v-decorator="['nicAdapterType', {
rules: [
{
required: false,
message: `${this.$t('message.error.select')}`
}
]
}]"
:placeholder="$t('label.nicadaptertype')">
<a-select-option v-for="opt in nicAdapterType.opts" :key="opt.id">
{{ opt.name || opt.description }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="24" :lg="24">
<a-form-item v-if="hyperVMWShow" :label="$t('label.keyboardtype')">
<a-select
@ -290,9 +246,9 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="12" v-if="!deployAsIsSelected">
<a-row :gutter="12" v-if="!hyperVMWShow">
<a-col :md="24" :lg="24">
<a-form-item :label="$t('label.ostypeid')" v-if="!deployAsIsSelected">
<a-form-item :label="$t('label.ostypeid')">
<a-select
showSearch
v-decorator="['ostypeid', {
@ -422,7 +378,6 @@ export default {
rootAdmin: 'Admin',
allowed: false,
allowDirectDownload: false,
deployAsIsSelected: false,
uploadParams: null,
currentForm: this.action.currentAction.icon === 'plus' ? 'Create' : 'Upload'
}
@ -455,9 +410,6 @@ export default {
this.fetchData()
},
computed: {
deployAsIsSupported () {
return this.apiConfig.params.filter(x => x.name === 'deployasis').length > 0
}
},
methods: {
fetchData () {
@ -808,7 +760,6 @@ export default {
this.hyperVMWShow = false
this.hyperKVMShow = false
this.allowDirectDownload = false
this.deployAsIsSelected = false
this.resetSelect()
this.fetchFormat(hyperVisor)
@ -823,7 +774,7 @@ export default {
return
}
let params = {}
if (this.deployAsIsSelected) {
if (this.hyperVMWShow) {
params.ostypeid = this.defaultOsId
}
for (const key in values) {
@ -917,9 +868,6 @@ export default {
handleChangeDirect (checked) {
this.allowDirectDownload = checked
},
handleChangeDeployAsIs (checked) {
this.deployAsIsSelected = checked
},
validZone (zones) {
const allZoneExists = zones.filter(zone => zone === this.$t('label.all.zone'))