ui: Fix editVM in projectview (#5485)

This commit is contained in:
davidjumani 2021-09-21 17:04:57 +05:30 committed by GitHub
parent 3eafbf7329
commit d9154e8a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -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)