From d9154e8a69d4e09f2ec9ed4fe8ca30c9e62f1e6b Mon Sep 17 00:00:00 2001 From: davidjumani Date: Tue, 21 Sep 2021 17:04:57 +0530 Subject: [PATCH] ui: Fix editVM in projectview (#5485) --- ui/src/views/compute/EditVM.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/src/views/compute/EditVM.vue b/ui/src/views/compute/EditVM.vue index 7746d6916ab..19afdc36c61 100644 --- a/ui/src/views/compute/EditVM.vue +++ b/ui/src/views/compute/EditVM.vue @@ -180,11 +180,16 @@ export default { fetchInstaceGroups () { this.groups.loading = true this.groups.opts = [] - api('listInstanceGroups', { - account: this.$store.getters.userInfo.account, + const params = { domainid: this.$store.getters.userInfo.domainid, listall: true - }).then(json => { + } + if (this.$store.getters.project && this.$store.getters.project.id) { + params.projectid = this.$store.getters.project.id + } else { + params.account = this.$store.getters.userInfo.account + } + api('listInstanceGroups', params).then(json => { const groups = json.listinstancegroupsresponse.instancegroup || [] groups.forEach(x => { this.groups.opts.push(x.name)