diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 77ab5de5a..53eb4c3a0 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -11,6 +11,8 @@ > Users must be able to say: “I had this issue, happy to know it's fixed” +- [Pool/Advanced] Show pool backup/migration network even if they no longer exist (PR [#7303](https://github.com/vatesfr/xen-orchestra/pull/7303)) + ### Packages to release > When modifying a package, add it here with its release type. @@ -27,4 +29,6 @@ +- xo-web minor + diff --git a/packages/xo-web/src/common/intl/messages.js b/packages/xo-web/src/common/intl/messages.js index c10749533..d38679d13 100644 --- a/packages/xo-web/src/common/intl/messages.js +++ b/packages/xo-web/src/common/intl/messages.js @@ -903,6 +903,7 @@ const messages = { // ----- Pool advanced tab ----- backupNetwork: 'Backup network', crashDumpSr: 'Crash dump SR', + defaultMigrationNetwork: 'Default migration network', poolEditAll: 'Edit all', poolHaStatus: 'High Availability', poolHaEnabled: 'Enabled', @@ -921,9 +922,9 @@ const messages = { setpoolMaster: 'Master', syslogRemoteHost: 'Remote syslog host', - defaultMigrationNetwork: 'Default migration network', syncNetbox: 'Synchronize with Netbox', syncNetboxWarning: 'Are you sure you want to synchronize with Netbox?', + updateMissingNetwork: '{networkID} not found, please select a new one', // ----- Pool host tab ----- hostNameLabel: 'Name', hostDescription: 'Description', diff --git a/packages/xo-web/src/xo-app/pool/tab-advanced.js b/packages/xo-web/src/xo-app/pool/tab-advanced.js index 7ad1d8480..7a3d33429 100644 --- a/packages/xo-web/src/xo-app/pool/tab-advanced.js +++ b/packages/xo-web/src/xo-app/pool/tab-advanced.js @@ -4,6 +4,7 @@ import _, { messages } from 'intl' import ActionButton from 'action-button' import ActionRowButton from 'action-row-button' import Component from 'base-component' +import Copiable from 'copiable' import Icon from 'icon' import renderXoItem, { Network, Sr } from 'render-xo-item' import SelectFiles from 'select-files' @@ -452,13 +453,22 @@ export default class TabAdvanced extends Component { value={migrationNetwork} xoType='network' > - {migrationNetwork !== undefined ? : _('noValue')} + {pool.otherConfig['xo:migrationNetwork'] === undefined ? ( + _('noValue') + ) : migrationNetwork !== undefined ? ( + + ) : ( + + {_('updateMissingNetwork', { + networkID: ( + + {pool.otherConfig['xo:migrationNetwork']} + + ), + })} + + )} {' '} - {migrationNetwork !== undefined && ( - - - - )} @@ -470,13 +480,22 @@ export default class TabAdvanced extends Component { value={backupNetwork} xoType='network' > - {backupNetwork !== undefined ? : _('noValue')} + {pool.otherConfig['xo:backupNetwork'] === undefined ? ( + _('noValue') + ) : backupNetwork !== undefined ? ( + + ) : ( + + {_('updateMissingNetwork', { + networkID: ( + + {pool.otherConfig['xo:backupNetwork']} + + ), + })} + + )} {' '} - {backupNetwork !== undefined && ( - - - - )}