File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 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 ) {
You can’t perform that action at this time.
0 commit comments