feat(xo-web/vm/migrate): choose network even within pool (#4828)
Fixes #2028
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||
|
||||
- [VM migration] Ability to choose network for migration within a pool [#2028](https://github.com/vatesfr/xen-orchestra/issues/2028) (PR [#4828](https://github.com/vatesfr/xen-orchestra/pull/4828))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
@@ -2958,7 +2958,7 @@ export default {
|
||||
chooseSrForEachVdisModalSrLabel: undefined,
|
||||
|
||||
// Original text: '* optional'
|
||||
chooseSrForEachVdisModalOptionalEntry: undefined,
|
||||
optionalEntry: undefined,
|
||||
|
||||
// Original text: 'Delete VDI'
|
||||
deleteVdiModalTitle: undefined,
|
||||
|
||||
@@ -3029,7 +3029,7 @@ export default {
|
||||
chooseSrForEachVdisModalSrLabel: 'SR*',
|
||||
|
||||
// Original text: "* optional"
|
||||
chooseSrForEachVdisModalOptionalEntry: '* optionnel',
|
||||
optionalEntry: '* optionnel',
|
||||
|
||||
// Original text: "Delete VDI"
|
||||
deleteVdiModalTitle: 'Supprimer le VDI',
|
||||
|
||||
@@ -3732,7 +3732,7 @@ export default {
|
||||
chooseSrForEachVdisModalSrLabel: 'SR*',
|
||||
|
||||
// Original text: "* optional"
|
||||
chooseSrForEachVdisModalOptionalEntry: '* opsiyonel',
|
||||
optionalEntry: '* opsiyonel',
|
||||
|
||||
// Original text: "Delete job{nJobs, plural, one {} other {s}}"
|
||||
deleteJobsModalTitle: 'İşi(leri) sil',
|
||||
|
||||
@@ -1654,7 +1654,6 @@ const messages = {
|
||||
chooseSrForEachVdisModalMainSr: 'Select main SR…',
|
||||
chooseSrForEachVdisModalVdiLabel: 'VDI',
|
||||
chooseSrForEachVdisModalSrLabel: 'SR*',
|
||||
chooseSrForEachVdisModalOptionalEntry: '* optional',
|
||||
deleteJobsModalTitle: 'Delete job{nJobs, plural, one {} other {s}}',
|
||||
deleteJobsModalMessage:
|
||||
'Are you sure you want to delete {nJobs, number} job{nJobs, plural, one {} other {s}}?',
|
||||
@@ -1727,6 +1726,7 @@ const messages = {
|
||||
forgetSrsFromHostModalTitle: 'Forget SR{nPbds, plural, one {} other {s}}',
|
||||
forgetSrsFromHostModalMessage:
|
||||
'Are you sure you want to forget {nPbds, number} SR{nPbds, plural, one {} other {s}}? This will disconnect the SRs from the host by removing the links between the host and the SRs (PBDs).',
|
||||
optionalEntry: '* optional',
|
||||
|
||||
// ----- Servers -----
|
||||
serverLabel: 'Label',
|
||||
|
||||
@@ -102,7 +102,7 @@ export default class ChooseSrForEachVdisModal extends Component {
|
||||
</Col>
|
||||
</SingleLineRow>
|
||||
))}
|
||||
<i>{_('chooseSrForEachVdisModalOptionalEntry')}</i>
|
||||
<i>{_('optionalEntry')}</i>
|
||||
</Container>
|
||||
</Collapsible>
|
||||
)}
|
||||
|
||||
@@ -219,7 +219,10 @@ export default class MigrateVmModalBody extends BaseComponent {
|
||||
}
|
||||
|
||||
_selectMigrationNetwork = migrationNetwork =>
|
||||
this.setState({ migrationNetworkId: migrationNetwork.id })
|
||||
this.setState({
|
||||
migrationNetworkId:
|
||||
migrationNetwork == null ? undefined : migrationNetwork.id,
|
||||
})
|
||||
|
||||
render() {
|
||||
const { vdis, vifs, networks } = this.props
|
||||
@@ -235,8 +238,8 @@ export default class MigrateVmModalBody extends BaseComponent {
|
||||
<div>
|
||||
<div className={styles.block}>
|
||||
<SingleLineRow>
|
||||
<Col size={4}>{_('migrateVmSelectHost')}</Col>
|
||||
<Col size={8}>
|
||||
<Col size={6}>{_('migrateVmSelectHost')}</Col>
|
||||
<Col size={6}>
|
||||
<SelectHost
|
||||
compareContainers={this.compareContainers}
|
||||
onChange={this._selectHost}
|
||||
@@ -262,20 +265,24 @@ export default class MigrateVmModalBody extends BaseComponent {
|
||||
</SingleLineRow>
|
||||
</div>
|
||||
)}
|
||||
{host !== undefined && (
|
||||
<div className={styles.groupBlock}>
|
||||
<SingleLineRow>
|
||||
<Col size={6}>{_('migrateVmSelectMigrationNetwork')}</Col>
|
||||
<Col size={6}>
|
||||
<SelectNetwork
|
||||
onChange={this._selectMigrationNetwork}
|
||||
predicate={this._getMigrationNetworkPredicate()}
|
||||
required={!intraPool}
|
||||
value={migrationNetworkId}
|
||||
/>
|
||||
</Col>
|
||||
</SingleLineRow>
|
||||
{intraPool && <i>{_('optionalEntry')}</i>}
|
||||
</div>
|
||||
)}
|
||||
{intraPool !== undefined && !intraPool && (
|
||||
<div>
|
||||
<div className={styles.groupBlock}>
|
||||
<SingleLineRow>
|
||||
<Col size={6}>{_('migrateVmSelectMigrationNetwork')}</Col>
|
||||
<Col size={6}>
|
||||
<SelectNetwork
|
||||
onChange={this._selectMigrationNetwork}
|
||||
predicate={this._getMigrationNetworkPredicate()}
|
||||
value={migrationNetworkId}
|
||||
/>
|
||||
</Col>
|
||||
</SingleLineRow>
|
||||
</div>
|
||||
<div className={styles.groupBlock}>
|
||||
<SingleLineRow>
|
||||
<Col>{_('migrateVmSelectNetworks')}</Col>
|
||||
|
||||
Reference in New Issue
Block a user