vishesh92 opened a new pull request, #13187: URL: https://github.com/apache/cloudstack/pull/13187
### Description This PR fixes #12978 This PR resolves missing project scopes issues within the AutoScale UI components (AutoScaleVmProfile.vue, AutoScaleUpPolicyTab.vue, and AutoScaleDownPolicyTab.vue). <details><summary>Generated Summary</summary> <p> This pull request improves the handling of project-scoped resources and enhances template name resolution in the AutoScale UI components. The main changes ensure that API requests include the `projectid` parameter when relevant, and that template names are accurately fetched and displayed, especially when templates may not be present in the local list. **Project-aware API requests:** * All API calls in `AutoScaleDownPolicyTab.vue`, `AutoScaleUpPolicyTab.vue`, and `AutoScaleLoadBalancing.vue` now include the `projectid` parameter if the resource is part of a project. This ensures correct data retrieval in multi-project environments. [[1]](diffhunk://#diff-2f0ad4d167a77a6e6150f6831733a88b28634c3d59868e2a0ac02940218c4daaL428-R435) [[2]](diffhunk://#diff-2f0ad4d167a77a6e6150f6831733a88b28634c3d59868e2a0ac02940218c4daaL440-R451) [[3]](diffhunk://#diff-2f0ad4d167a77a6e6150f6831733a88b28634c3d59868e2a0ac02940218c4daaL467-R482) [[4]](diffhunk://#diff-1c4178a87210408300869d4b9e7a815af232a633579e8a3c9b684098633b244fL465-R474) [[5]](diffhunk://#diff-1c4178a87210408300869d4b9e7a815af232a633579e8a3c9b684098633b244fL522-R533) [[6]](diffhunk://#diff-6a664b52c8461293b6cf6361d6c9da31786e181cae22e84216eee0f5fafad2f9L428-R435) [[7]](diffhunk://#diff-6a664b52c8461293b6cf6361d6c9da31786e181cae22e84216eee0f5fafad2f9L440-R451) [[8]](diffhunk://#diff-6a664b52c8461293b6cf6361d6c9da317 86e181cae22e84216eee0f5fafad2f9L467-R482) * Similar updates in `AutoScaleVmProfile.vue` add `projectid` to template, VM profile, and related API requests for project-scoped resources. [[1]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR426-R428) [[2]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR443-R445) [[3]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL449-R469) **Template name resolution improvements:** * Replaces the previous method of looking up template names from a local list with an API call (`listTemplates`) to fetch the template name by `templateid`. If the template is not found, the raw `templateid` is displayed as a fallback. [[1]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR341) [[2]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL449-R469) [[3]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL471-R498) [[4]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL65-R65) **UI/UX enhancements:** * After updating an AutoScale VM profile, the UI now refreshes profile data to reflect changes immediately and closes the modal dialog upon success. [[1]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR600-R613) [[2]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR632) [[3]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR647) * Prevents multiple concurrent updates by disabling the update action while loading. These changes collectively improve the correctness and user experience of the AutoScale UI, especially for users working with project resources. </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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
