shwstppr opened a new issue, #10832:
URL: https://github.com/apache/cloudstack/issues/10832

   ### problem
   
   When accessing the "Deploy VM" wizard (and potentially other forms), most 
data is fetched twice. This appears to be caused by the OwnershipSelection 
component, which resets and re-fetches data upon creation. As a result, 
redundant API calls are triggered, impacting performance and potentially user 
experience.
   
   Added the following logs to check,
   
   ```
   diff --git a/ui/src/views/compute/DeployVM.vue 
b/ui/src/views/compute/DeployVM.vue
   index c6b6842bb6..d0eeff36c3 100644
   --- a/ui/src/views/compute/DeployVM.vue
   +++ b/ui/src/views/compute/DeployVM.vue
   @@ -1723,6 +1723,7 @@ export default {
          })
        },
        async fetchData () {
   +      console.log(new Date().toLocaleString(), 'T3st - fetching data')
          const zones = await this.fetchZoneByQuery()
          if (zones && zones.length === 1) {
            this.selectedZone = zones[0]
   @@ -2327,6 +2328,7 @@ export default {
            this.owner.domainid = null
            this.owner.projectid = OwnerOptions.selectedProject
          }
   +      console.log(new Date().toLocaleString(), 'T3st - resetting data')
          this.resetData()
        },
        fetchZones (zoneId, listZoneAllow) {
   ```
   
   
https://github.com/user-attachments/assets/c5ec9c0c-3e6e-4fb8-9d0f-4d713d032155
   
   ### versions
   
   4.20, maybe others which have ownership selection UI
   
   ### The steps to reproduce the bug
   
   1. Open deploy vm wizard
   2. Check many list APIs being called twice
   
   
   ### What to do about it?
   
   Do not reset data on initial creation of the components


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to