Skip to content

ui: show selected template hypervisor in deploy form - #13813

Draft
Dogface2k wants to merge 4 commits into
apache:4.22from
Dogface2k:fix/issue-13786-hypervisor-label
Draft

ui: show selected template hypervisor in deploy form#13813
Dogface2k wants to merge 4 commits into
apache:4.22from
Dogface2k:fix/issue-13786-hypervisor-label

Conversation

@Dogface2k

@Dogface2k Dogface2k commented Aug 6, 2026

Copy link
Copy Markdown

Description

This PR fixes the hypervisor label and effective UI state shown by the VM deployment form when a zone contains multiple hypervisor types.

DeployVM.vue initializes its hypervisor form state from the first value returned for the selected zone. Both the modern and legacy image selectors previously propagated only the selected template ID, so selecting a XenServer or VMware template could leave the original KVM value in the deployment review card and in hypervisor-gated UI state.

The change:

resolves the selected template from the grouped image results and propagates its own hypervisor metadata through the selectors' existing field-update event;

applies the same behaviour to both the modern and legacy image-selection interfaces;

re-evaluates a preselected template when its asynchronously loaded metadata becomes available;

preserves the existing fallback when a template cannot be resolved or has no hypervisor metadata;

does not override ISO, volume, or snapshot selection, so ISO hypervisor selection remains explicit.

Template deployment request behaviour is unchanged. The existing deployment path continues to omit the separate hypervisor parameter for template deployments, while ISO deployments continue using the explicitly selected hypervisor. There are no backend, API, database, configuration, or workflow changes.

Fixes: #13786

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

The incorrect KVM label is shown in the screenshots attached to #13786.

How Has This Been Tested?

Focused regression coverage was added in ImageSelectionHypervisor.spec.js for the actual modern and legacy selector methods and metadata watchers. It covers:

KVM, XenServer, VMware, and External template metadata;

both modern and legacy image-selection interfaces;

templates selected after their metadata is available;

query/prefill-style selections whose metadata arrives asynchronously;

unresolved templates and templates without hypervisor metadata;

ISO selection remaining independent from template hypervisor propagation.

A dependency-free Node runtime harness exercised the same resolver, selector methods, event ordering, and delayed-metadata paths successfully. The final branch was also audited against the exact current 4.22 head (5328528): it is one commit ahead and contains only the four intended UI/test files.

The complete repository UI test suite was not available in the local environment, so no full Jest, lint, build, or repository CI result is claimed here.

How did you try to break this feature and the system with this change?

Kept KVM as a control to verify its existing label remains KVM.

Selected XenServer and VMware templates from a mixed-hypervisor image set.

Selected an External template from a different image-result group.

Exercised a preselected template before its image metadata was loaded.

Exercised missing and incomplete template metadata to verify the existing fallback is preserved.

Exercised ISO selection to verify the template-specific propagation does not replace the explicit ISO hypervisor path.

Audited the final diff for unrelated files; no workflow, API, backend, schema, or deployment-request changes are included.

@Dogface2k
Dogface2k marked this pull request as draft August 6, 2026 10:21
@Dogface2k
Dogface2k marked this pull request as ready for review August 6, 2026 10:32
@Dogface2k
Dogface2k marked this pull request as draft August 6, 2026 10:43
@Dogface2k
Dogface2k force-pushed the fix/issue-13786-hypervisor-label branch from 0353d59 to 022dbf3 Compare August 6, 2026 10:45
@Dogface2k
Dogface2k force-pushed the fix/issue-13786-hypervisor-label branch from 022dbf3 to 171445b Compare August 6, 2026 11:08
@Dogface2k
Dogface2k marked this pull request as ready for review August 6, 2026 11:50
@Dogface2k
Dogface2k marked this pull request as draft August 6, 2026 12:20
@Dogface2k

Dogface2k commented Aug 6, 2026

Copy link
Copy Markdown
Author

Reviewing,

Agents last 4 edits compared with main again and not 4.22, still being reviewed everything will be rectified.

(Once agents back in my environment it will stop farting around with the github api.)

Will recreate PR without this chern

External guardrail in progress to prevent this while agents are outside of my personal environments.

@Dogface2k
Dogface2k force-pushed the fix/issue-13786-hypervisor-label branch from 4788654 to 3fefbb5 Compare August 6, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants