From 6c5233b19591d70c044f64163c764677bab8c7a5 Mon Sep 17 00:00:00 2001 From: davidjumani Date: Thu, 25 Mar 2021 13:46:04 +0530 Subject: [PATCH 1/2] Set isrecursive to false when fetching accounts --- ui/src/views/compute/AssignInstance.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/views/compute/AssignInstance.vue b/ui/src/views/compute/AssignInstance.vue index 3d83f3ff756d..c259bf0dd08e 100644 --- a/ui/src/views/compute/AssignInstance.vue +++ b/ui/src/views/compute/AssignInstance.vue @@ -137,7 +137,7 @@ export default { response: 'json', domainId: this.selectedDomain, state: 'Enabled', - listAll: true + isrecursive: false }).then(response => { this.accounts = response.listaccountsresponse.account this.loading = false @@ -150,7 +150,7 @@ export default { domainId: this.selectedDomain, state: 'Active', details: 'min', - listAll: true + isrecursive: false }).then(response => { this.projects = response.listprojectsresponse.project this.loading = false From 1c92b8c5c6ea1b738daa55813b232d4276697c70 Mon Sep 17 00:00:00 2001 From: davidjumani Date: Tue, 30 Mar 2021 10:11:50 +0530 Subject: [PATCH 2/2] Adding exception handling --- ui/src/views/compute/AssignInstance.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ui/src/views/compute/AssignInstance.vue b/ui/src/views/compute/AssignInstance.vue index c259bf0dd08e..936467f4c857 100644 --- a/ui/src/views/compute/AssignInstance.vue +++ b/ui/src/views/compute/AssignInstance.vue @@ -129,6 +129,10 @@ export default { this.selectedDomain = this.domains[0].id this.fetchAccounts() this.fetchProjects() + }).catch(error => { + this.$notifyError(error) + }).finally(() => { + this.loading = false }) }, fetchAccounts () { @@ -140,6 +144,9 @@ export default { isrecursive: false }).then(response => { this.accounts = response.listaccountsresponse.account + }).catch(error => { + this.$notifyError(error) + }).finally(() => { this.loading = false }) }, @@ -153,6 +160,9 @@ export default { isrecursive: false }).then(response => { this.projects = response.listprojectsresponse.project + }).catch(error => { + this.$notifyError(error) + }).finally(() => { this.loading = false }) }, @@ -167,6 +177,9 @@ export default { projectid: this.selectedProject }).then(response => { this.networks = response.listnetworksresponse.network + }).catch(error => { + this.$notifyError(error) + }).finally(() => { this.loading = false }) },