From dd515346d5bde07bf1fba538714316d371f6245f Mon Sep 17 00:00:00 2001 From: Nicolas Vazquez Date: Mon, 20 Feb 2023 09:49:53 -0300 Subject: [PATCH] Fix select default host option on deployment wizard (#7256) --- ui/src/views/compute/DeployVM.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index df269f1b4bd..02f257a13c5 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -123,6 +123,7 @@ :filterOption="filterOption" :options="hostSelectOptions" :loading="loading.hosts" + @change="onSelectHostId" > @@ -1005,7 +1006,7 @@ export default { }) options.unshift({ label: this.$t('label.default'), - value: undefined + value: null }) return options }, @@ -1018,7 +1019,7 @@ export default { }) options.unshift({ label: this.$t('label.default'), - value: undefined + value: null }) return options }, @@ -1031,7 +1032,7 @@ export default { }) options.unshift({ label: this.$t('label.default'), - value: undefined + value: null }) return options }, @@ -2130,15 +2131,27 @@ export default { }, onSelectPodId (value) { this.podId = value + if (this.podId === null) { + this.form.podid = undefined + } this.fetchOptions(this.params.clusters, 'clusters') this.fetchOptions(this.params.hosts, 'hosts') }, onSelectClusterId (value) { this.clusterId = value + if (this.clusterId === null) { + this.form.clusterid = undefined + } this.fetchOptions(this.params.hosts, 'hosts') }, + onSelectHostId (value) { + this.hostId = value + if (this.hostId === null) { + this.form.hostid = undefined + } + }, handleSearchFilter (name, options) { this.params[name].options = { ...this.params[name].options, ...options } this.fetchOptions(this.params[name], name)