Skip to content

Commit fd4bc61

Browse files
authored
ui: assignVM: Set isrecursive to false when fetching accounts (#4867)
* Set isrecursive to false when fetching accounts * Adding exception handling
1 parent 5b986be commit fd4bc61

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

ui/src/views/compute/AssignInstance.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ export default {
134134
this.selectedDomain = this.domains[0].id
135135
this.fetchAccounts()
136136
this.fetchProjects()
137+
}).catch(error => {
138+
this.$notifyError(error)
139+
}).finally(() => {
140+
this.loading = false
137141
})
138142
},
139143
fetchAccounts () {
@@ -142,9 +146,12 @@ export default {
142146
response: 'json',
143147
domainId: this.selectedDomain,
144148
state: 'Enabled',
145-
listAll: true
149+
isrecursive: false
146150
}).then(response => {
147151
this.accounts = response.listaccountsresponse.account
152+
}).catch(error => {
153+
this.$notifyError(error)
154+
}).finally(() => {
148155
this.loading = false
149156
})
150157
},
@@ -155,9 +162,12 @@ export default {
155162
domainId: this.selectedDomain,
156163
state: 'Active',
157164
details: 'min',
158-
listAll: true
165+
isrecursive: false
159166
}).then(response => {
160167
this.projects = response.listprojectsresponse.project
168+
}).catch(error => {
169+
this.$notifyError(error)
170+
}).finally(() => {
161171
this.loading = false
162172
})
163173
},
@@ -172,6 +182,9 @@ export default {
172182
projectid: this.selectedProject
173183
}).then(response => {
174184
this.networks = response.listnetworksresponse.network
185+
}).catch(error => {
186+
this.$notifyError(error)
187+
}).finally(() => {
175188
this.loading = false
176189
})
177190
},

0 commit comments

Comments
 (0)