rohityadavcloud opened a new pull request, #7846:
URL: https://github.com/apache/cloudstack/pull/7846

   This introduces change in AutogenView to do the following:
   
   - Cancel old API requests when the route is changed (between different list 
view or list and resource views)
   - In the handler of an API call made in the fetchData(), to check if the 
json received is for the current route/id or apiName
   - Add console log for debugging which may be removed if this passes code 
review and testing
   
   How was this tested?
   - In my env the listVirtualMachines API takes time to complete, so I go to 
the instances page and go quick back/forth other views; for example, go to 
instances page that doesn't load and click on 2nd VM (or go to instance page 
and search something that returns faster than the whole list API and go the 
VM). When the original list API call completes, the current VM is replaced by 
the first VM in the list.
   - Check console log with the fix and network to see that old API (xhr) 
requests that haven't completed are cancelled when the route/view is changed 
between list and resource views of different resources
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
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