Skip to content
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

feat(xo-web/new VM): always show ISO selector #7166

Merged
merged 9 commits into from
Nov 22, 2023
2 changes: 2 additions & 0 deletions CHANGELOG.unreleased.md
pdonias marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”

- [Netbox] Ability to synchronize XO users as Netbox tenants (PR [#7158](https://github.com/vatesfr/xen-orchestra/pull/7158))
- [VM Creation] Added ISO option in new VM form when creating from template with a disk [#3464](https://github.com/vatesfr/xen-orchestra/issues/3464) (PR [#7166](https://github.com/vatesfr/xen-orchestra/pull/7166))

### Bug fixes

Expand Down Expand Up @@ -39,5 +40,6 @@
- xo-server-netbox minor
- xo-vmdk-to-vhd patch
- xo-web patch
- xo-web minor

<!--packages-end-->
68 changes: 34 additions & 34 deletions packages/xo-web/src/xo-app/new-vm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1223,40 +1223,6 @@ export default class NewVm extends BaseComponent {
</SectionContent>
) : (
<SectionContent>
<Item>
<span className={styles.item}>
<input
checked={installMethod === 'ISO'}
name='installMethod'
onChange={this._linkState('installMethod')}
type='radio'
value='ISO'
/>
&nbsp;
<span>{_('newVmIsoDvdLabel')}</span>
&nbsp;
<span className={styles.inlineSelect}>
{this.props.pool ? (
<SelectVdi
disabled={installMethod !== 'ISO'}
onChange={this._linkState('installIso')}
predicate={isVdiPresent}
srPredicate={this._getIsoPredicate()}
value={installIso}
/>
) : (
<SelectResourceSetsVdi
disabled={installMethod !== 'ISO'}
onChange={this._linkState('installIso')}
predicate={isVdiPresent}
resourceSet={this._getResolvedResourceSet()}
srPredicate={this._getIsoPredicate()}
value={installIso}
/>
)}
</span>
</span>
</Item>
{template.virtualizationMode === 'pv' ? (
<span>
<Item>
Expand Down Expand Up @@ -1295,6 +1261,40 @@ export default class NewVm extends BaseComponent {
)}
</SectionContent>
)}
<SectionContent>
<span className={styles.item}>
<input
checked={installMethod === 'ISO'}
name='installMethod'
onChange={this._linkState('installMethod')}
type='radio'
value='ISO'
/>
&nbsp;
<span>{_('newVmIsoDvdLabel')}</span>
&nbsp;
<span className={styles.inlineSelect}>
{this.props.pool ? (
<SelectVdi
disabled={installMethod !== 'ISO'}
onChange={this._linkState('installIso')}
predicate={isVdiPresent}
srPredicate={this._getIsoPredicate()}
value={installIso}
/>
) : (
<SelectResourceSetsVdi
disabled={installMethod !== 'ISO'}
onChange={this._linkState('installIso')}
predicate={isVdiPresent}
resourceSet={this._getResolvedResourceSet()}
srPredicate={this._getIsoPredicate()}
value={installIso}
/>
)}
</span>
</span>
</SectionContent>
{this._isCoreOs() && (
<div>
<label>{_('newVmCloudConfig')}</label>{' '}
Expand Down