ui: assignVM: Set isrecursive to false when fetching accounts (#4867)

* Set isrecursive to false when fetching accounts

* Adding exception handling
This commit is contained in:
davidjumani 2021-04-01 12:29:57 +05:30 committed by GitHub
parent 5b986be5ba
commit fd4bc612d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 2 deletions

View File

@ -134,6 +134,10 @@ export default {
this.selectedDomain = this.domains[0].id
this.fetchAccounts()
this.fetchProjects()
}).catch(error => {
this.$notifyError(error)
}).finally(() => {
this.loading = false
})
},
fetchAccounts () {
@ -142,9 +146,12 @@ export default {
response: 'json',
domainId: this.selectedDomain,
state: 'Enabled',
listAll: true
isrecursive: false
}).then(response => {
this.accounts = response.listaccountsresponse.account
}).catch(error => {
this.$notifyError(error)
}).finally(() => {
this.loading = false
})
},
@ -155,9 +162,12 @@ export default {
domainId: this.selectedDomain,
state: 'Active',
details: 'min',
listAll: true
isrecursive: false
}).then(response => {
this.projects = response.listprojectsresponse.project
}).catch(error => {
this.$notifyError(error)
}).finally(() => {
this.loading = false
})
},
@ -172,6 +182,9 @@ export default {
projectid: this.selectedProject
}).then(response => {
this.networks = response.listnetworksresponse.network
}).catch(error => {
this.$notifyError(error)
}).finally(() => {
this.loading = false
})
},