From 23fc8bbb90beed03987d27c4fbea5fb6c37aedce Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Thu, 4 Jun 2020 09:38:57 +0700 Subject: [PATCH] compute: fix list host, cluster not filtered in VM deployment form (#378) Fixes #376 Signed-off-by: Rohit Yadav --- ui/src/views/compute/DeployVM.vue | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index d7b234f2351..09d36a3da37 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -51,6 +51,7 @@ v-decorator="['podid']" :options="podSelectOptions" :loading="loading.pods" + @change="onSelectPodId" > option.id === value) this.zoneSelected = true this.form.setFieldsValue({ @@ -1109,6 +1118,17 @@ export default { }) this.fetchAllTemplates() }, + onSelectPodId (value) { + this.podId = value + + this.fetchOptions(this.params.clusters, 'clusters') + this.fetchOptions(this.params.hosts, 'hosts') + }, + onSelectClusterId (value) { + this.clusterId = value + + this.fetchOptions(this.params.hosts, 'hosts') + }, handleSearchFilter (name, options) { this.params[name].options = { ...this.params[name].options, ...options } this.fetchOptions(this.params[name], name)