Skip to content

Commit e6503f5

Browse files
committed
ui fixes for vmware to kvm migration
1 parent 212f2a3 commit e6503f5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

ui/src/views/tools/SelectVmwareVcenter.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
}"
136136
:placeholder="$t('label.vcenter.host')"
137137
@change="onSelectExistingVmwareHost">
138+
<a-select-option key="" label="">{{ }}</a-select-option>
138139
<a-select-option v-for="opt in hosts" :key="opt.name">
139140
{{ 'ESXi: ' + opt.name }}
140141
</a-select-option>
@@ -283,7 +284,7 @@ export default {
283284
this.loading = false
284285
})
285286
},
286-
listZoneVmwareDcHosts () {
287+
listZoneVmwareDcHosts (doNotify) {
287288
this.loading = true
288289
const params = {}
289290
if (this.vcenterSelectedOption === 'new') {
@@ -299,18 +300,22 @@ export default {
299300
this.hosts = response.listvmwaredchostsresponse.host
300301
}
301302
}).catch(error => {
302-
this.$notifyError(error)
303+
if (doNotify) {
304+
this.$notifyError(error)
305+
}
306+
return false
303307
}).finally(() => {
304308
this.loading = false
309+
return true
305310
})
306311
},
307312
onSelectExistingVmwareDatacenter (value) {
308313
this.selectedExistingVcenterId = value
309-
this.listZoneVmwareDcHosts()
314+
this.listZoneVmwareDcHosts(true)
310315
},
311316
onSelectExternalVmwareDatacenter (value) {
312317
if (this.vcenterSelectedOption === 'new' && !(this.vcenter === '' || this.datacentername === '' || this.username === '' || this.password === '')) {
313-
this.listZoneVmwareDcHosts()
318+
this.listZoneVmwareDcHosts(false)
314319
}
315320
},
316321
onSelectExistingVmwareHost (value) {

0 commit comments

Comments
 (0)