-
Notifications
You must be signed in to change notification settings - Fork 1.2k
UI: Fix ISO Hypervisor selection #11261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Fix ISO Hypervisor selection #11261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where hypervisor type selection was ignored when deploying an Instance from an ISO in a multi-hypervisor environment, causing the system to always select the first hypervisor from the list. Additionally, it refactors API calls in the ZoneWizardRegisterTemplate component for better consistency.
- Fixed hypervisor selection by correctly updating the form.hypervisor property instead of a standalone variable
- Simplified event handling for hypervisor changes in the image selection component
- Refactored API calls to use specific getAPI and postAPI functions instead of the generic api function
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
ui/src/views/compute/DeployVM.vue | Fixed hypervisor selection bug by updating form.hypervisor instead of standalone hypervisor variable |
ui/src/views/compute/wizard/OsBasedImageSelection.vue | Simplified event handler and fixed parameter passing for hypervisor changes |
ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue | Refactored API calls to use specific getAPI/postAPI functions for better code clarity |
@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11261 +/- ##
============================================
- Coverage 16.57% 16.57% -0.01%
- Complexity 14057 14059 +2
============================================
Files 5772 5772
Lines 512939 512956 +17
Branches 62305 62308 +3
============================================
- Hits 85033 85025 -8
- Misses 418425 418450 +25
Partials 9481 9481
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
UI build: ✔️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
Verified the hypervisor selection from UI (of env with multiple hypervisors) in VM deployment using ISO. |
Description
When deploying an Instance from an ISO in a multi hypervisor env, hypervisor type selection is ignored and it selects the first hypervisor from the list.
This PR fixes the above bug which was introduced in #10773
Apart from the above, this PR updates the older api to getAPI & postAPI for
ZoneWizardRegisterTemplate
.Generated summary
This pull request introduces updates to improve the handling of hypervisor changes in the UI and refactors API calls in the
ZoneWizardRegisterTemplate.vue
component for better code clarity and consistency. The most important changes include modifying event handlers for hypervisor updates, refactoring API utility usage, and ensuring proper state updates.UI Improvements for Hypervisor Handling:
ui/src/views/compute/DeployVM.vue
: Updated the@change-iso-hypervisor
event to correctly update theform.hypervisor
property instead of a standalonehypervisor
variable.ui/src/views/compute/wizard/OsBasedImageSelection.vue
: Simplified the@change
event binding forhandleIsoHypervisorChange
by removing the unnecessary parentheses.ui/src/views/compute/wizard/OsBasedImageSelection.vue
: Refactored thehandleIsoHypervisorChange
method to accept ahypervisor
parameter directly, ensuring the emitted event receives the correct value.API Refactoring:
ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue
: Replaced the genericapi
import withgetAPI
andpostAPI
for clearer intent in API calls.ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue
: UpdatedregisterTemplate
to usepostAPI
andlistOsTypes
to usegetAPI
, aligning with the new API utility functions. [1] [2]Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?