Skip to content

Commit d9154e8

Browse files
authored
ui: Fix editVM in projectview (#5485)
1 parent 3eafbf7 commit d9154e8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ui/src/views/compute/EditVM.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,16 @@ export default {
180180
fetchInstaceGroups () {
181181
this.groups.loading = true
182182
this.groups.opts = []
183-
api('listInstanceGroups', {
184-
account: this.$store.getters.userInfo.account,
183+
const params = {
185184
domainid: this.$store.getters.userInfo.domainid,
186185
listall: true
187-
}).then(json => {
186+
}
187+
if (this.$store.getters.project && this.$store.getters.project.id) {
188+
params.projectid = this.$store.getters.project.id
189+
} else {
190+
params.account = this.$store.getters.userInfo.account
191+
}
192+
api('listInstanceGroups', params).then(json => {
188193
const groups = json.listinstancegroupsresponse.instancegroup || []
189194
groups.forEach(x => {
190195
this.groups.opts.push(x.name)

0 commit comments

Comments
 (0)