feat(xo-web/new VM): hide missing VDIs

See #5222

Related to 15bc30a2d
This commit is contained in:
Julien Fontanet 2020-09-11 11:10:25 +02:00
parent 1d4f5d068a
commit 9e37f3f586
2 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,7 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [VM Import] Make the `Description` field optional (PR [#5258](https://github.com/vatesfr/xen-orchestra/pull/5258))
- [New VM] Hide missing ISOs in selector [#5222](https://github.com/vatesfr/xen-orchestra/issues/5222)
### Bug fixes
@ -30,4 +31,4 @@
>
> In case of conflict, the highest (lowest in previous list) `$version` wins.
- xo-web patch
- xo-web minor

View File

@ -223,6 +223,8 @@ class Vif extends BaseComponent {
// =============================================================================
const isVdiPresent = vdi => !vdi.missing
@addSubscriptions({
resourceSets: subscribeResourceSets,
user: subscribeCurrentUser,
@ -1315,6 +1317,7 @@ export default class NewVm extends BaseComponent {
<SelectVdi
disabled={installMethod !== 'ISO'}
onChange={this._linkState('installIso')}
predicate={isVdiPresent}
srPredicate={this._getIsoPredicate()}
value={installIso}
/>
@ -1322,6 +1325,7 @@ export default class NewVm extends BaseComponent {
<SelectResourceSetsVdi
disabled={installMethod !== 'ISO'}
onChange={this._linkState('installIso')}
predicate={isVdiPresent}
resourceSet={this._getResolvedResourceSet()}
srPredicate={this._getIsoPredicate()}
value={installIso}