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

   ### Description
   
   This PR fixes the project views for different resources. This bug was 
introduced in https://github.com/apache/cloudstack/pull/10899
   
   <details><summary>Generated Summary</summary>
   <p>
   
   This pull request updates several components and utilities in the UI 
codebase to replace the `api` function with the new `getAPI` function. 
Additionally, it introduces enhanced handling for GET and POST requests in the 
`request.js` utility, ensuring better parameter management based on 
project-specific data.
   
   ### Transition to `getAPI` function:
   
   * 
[`ui/src/components/view/ImageDeployInstanceButton.vue`](diffhunk://#diff-3a948afcd76eca782c083f2974afa1a4280e8a10e9833ad16992396d783ce587L44-R44):
 Replaced `api` calls with `getAPI` in methods handling image and zone data 
retrieval. 
(`[[1]](diffhunk://#diff-3a948afcd76eca782c083f2974afa1a4280e8a10e9833ad16992396d783ce587L44-R44)`,
 
`[[2]](diffhunk://#diff-3a948afcd76eca782c083f2974afa1a4280e8a10e9833ad16992396d783ce587L103-R103)`,
 
`[[3]](diffhunk://#diff-3a948afcd76eca782c083f2974afa1a4280e8a10e9833ad16992396d783ce587L125-R125)`)
   * 
[`ui/src/views/compute/KubernetesAddNodes.vue`](diffhunk://#diff-847e959868f4af0fb0d24d27f314cb791713a4cf01e8067d2d10419293a66e25L69-R69):
 Updated `api` calls to use `getAPI` for virtual machine listing and Kubernetes 
cluster node addition. 
(`[[1]](diffhunk://#diff-847e959868f4af0fb0d24d27f314cb791713a4cf01e8067d2d10419293a66e25L69-R69)`,
 
`[[2]](diffhunk://#diff-847e959868f4af0fb0d24d27f314cb791713a4cf01e8067d2d10419293a66e25L115-R115)`,
 
`[[3]](diffhunk://#diff-847e959868f4af0fb0d24d27f314cb791713a4cf01e8067d2d10419293a66e25L175-R175)`)
   * 
[`ui/src/views/compute/KubernetesRemoveNodes.vue`](diffhunk://#diff-c12f5c7c134357fb167759c6328c5c68470007b0115a9acc6464b077940766b6L57-R57):
 Modified `api` calls to `getAPI` for Kubernetes cluster node removal 
functionality. 
(`[[1]](diffhunk://#diff-c12f5c7c134357fb167759c6328c5c68470007b0115a9acc6464b077940766b6L57-R57)`,
 
`[[2]](diffhunk://#diff-c12f5c7c134357fb167759c6328c5c68470007b0115a9acc6464b077940766b6L140-R140)`)
   
   ### Enhanced request handling:
   
   * 
[`ui/src/utils/request.js`](diffhunk://#diff-82143124b587442d2939687f99efdccc786aee6860b6bc307e058d1d9ed70f48R152-R153):
 Added logic to handle GET requests by appending a `response` parameter and 
POST requests by dynamically managing `projectid` and `ignoreproject` 
parameters based on the current project and command type. 
(`[[1]](diffhunk://#diff-82143124b587442d2939687f99efdccc786aee6860b6bc307e058d1d9ed70f48R152-R153)`,
 
`[[2]](diffhunk://#diff-82143124b587442d2939687f99efdccc786aee6860b6bc307e058d1d9ed70f48R168-R187)`)
   
   </p>
   </details> 
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
******************************************************************************* 
-->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
******************************************************************************* 
-->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] 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)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### 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 
-->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- 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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to