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 @@ -7,7 +7,9 @@

> Users must be able to say: “Nice enhancement, I'm eager to test it”

- [REST API] Add `users` collection
pdonias marked this conversation as resolved.
Show resolved Hide resolved
- [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))
pdonias marked this conversation as resolved.
Show resolved Hide resolved

### Bug fixes

Expand Down
69 changes: 35 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 @@ -1220,43 +1220,10 @@ export default class NewVm extends BaseComponent {
</Item>
)}
</LineItem>
<br />
pdonias marked this conversation as resolved.
Show resolved Hide resolved
pdonias marked this conversation as resolved.
Show resolved Hide resolved
</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 +1262,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