Skip to content

Commit 31b5693

Browse files
shwstpprLocharla, Sandeep
authored andcommitted
ui: fix form data double fetch/reset form data by ownership selection (apache#11705)
* ui: fix form data double fetch/reset form data by ownership selection Fixes apache#10832
1 parent fcfc36c commit 31b5693

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

ui/src/views/compute/DeployVM.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2621,7 +2621,9 @@ export default {
26212621
this.owner.domainid = null
26222622
this.owner.projectid = OwnerOptions.selectedProject
26232623
}
2624-
this.resetData()
2624+
if (OwnerOptions.initialized) {
2625+
this.resetData()
2626+
}
26252627
},
26262628
fetchZones (zoneId, listZoneAllow) {
26272629
this.zones = []

ui/src/views/network/CreateIsolatedNetworkForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ export default {
507507
this.owner.domainid = null
508508
this.owner.projectid = OwnerOptions.selectedProject
509509
}
510-
if (isAdminOrDomainAdmin()) {
510+
if (OwnerOptions.initialized && isAdminOrDomainAdmin()) {
511511
this.updateVPCCheckAndFetchNetworkOfferingData()
512512
}
513513
},

ui/src/views/network/CreateL2NetworkForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export default {
309309
this.owner.domainid = null
310310
this.owner.projectid = OwnerOptions.selectedProject
311311
}
312-
if (isAdminOrDomainAdmin()) {
312+
if (OwnerOptions.initialized && this.isAdminOrDomainAdmin()) {
313313
this.updateVPCCheckAndFetchNetworkOfferingData()
314314
}
315315
},

ui/src/views/storage/CreateSharedFS.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,23 +272,21 @@ export default {
272272
},
273273
fetchOwnerOptions (OwnerOptions) {
274274
this.owner = {}
275-
console.log('fetching owner')
276275
if (OwnerOptions.selectedAccountType === 'Account') {
277276
if (!OwnerOptions.selectedAccount) {
278277
return
279278
}
280-
console.log('fetched account')
281279
this.owner.account = OwnerOptions.selectedAccount
282280
this.owner.domainid = OwnerOptions.selectedDomain
283281
} else if (OwnerOptions.selectedAccountType === 'Project') {
284282
if (!OwnerOptions.selectedProject) {
285283
return
286284
}
287-
console.log('fetched project')
288285
this.owner.projectid = OwnerOptions.selectedProject
289286
}
290-
console.log('fetched owner')
291-
this.fetchData()
287+
if (OwnerOptions.initialized) {
288+
this.fetchData()
289+
}
292290
},
293291
fetchData () {
294292
this.minCpu = store.getters.features.sharedfsvmmincpucount

ui/src/views/storage/CreateVolume.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ export default {
272272
}
273273
this.owner.projectid = OwnerOptions.selectedProject
274274
}
275-
this.fetchData()
275+
if (OwnerOptions.initialized) {
276+
this.fetchData()
277+
}
276278
},
277279
fetchData () {
278280
if (this.createVolumeFromSnapshot) {

0 commit comments

Comments
 (0)