fix(xo-web/new/sr): remove warning modal for already used path (#3851)
Fixes #3844
This commit is contained in:
parent
0f0ad029a6
commit
db19668453
@ -21,6 +21,7 @@
|
|||||||
- [Servers] Fix cannot reconnect to a server after connection has been lost [#3839](https://github.com/vatesfr/xen-orchestra/issues/3839) (PR [#3841](https://github.com/vatesfr/xen-orchestra/pull/3841))
|
- [Servers] Fix cannot reconnect to a server after connection has been lost [#3839](https://github.com/vatesfr/xen-orchestra/issues/3839) (PR [#3841](https://github.com/vatesfr/xen-orchestra/pull/3841))
|
||||||
- [New VM] Fix `NO_HOSTS_AVAILABLE()` error when creating a VM on a local SR from template on another local SR [#3084](https://github.com/vatesfr/xen-orchestra/issues/3084) (PR [#3827](https://github.com/vatesfr/xen-orchestra/pull/3827))
|
- [New VM] Fix `NO_HOSTS_AVAILABLE()` error when creating a VM on a local SR from template on another local SR [#3084](https://github.com/vatesfr/xen-orchestra/issues/3084) (PR [#3827](https://github.com/vatesfr/xen-orchestra/pull/3827))
|
||||||
- [Backup NG] Fix typo in the form [#3854](https://github.com/vatesfr/xen-orchestra/issues/3854) (PR [#3855](https://github.com/vatesfr/xen-orchestra/pull/3855))
|
- [Backup NG] Fix typo in the form [#3854](https://github.com/vatesfr/xen-orchestra/issues/3854) (PR [#3855](https://github.com/vatesfr/xen-orchestra/pull/3855))
|
||||||
|
- [New SR] No warning when creating a NFS SR on a path that is already used as NFS SR [#3844](https://github.com/vatesfr/xen-orchestra/issues/3844) (PR [#3851](https://github.com/vatesfr/xen-orchestra/pull/3851))
|
||||||
|
|
||||||
### Released packages
|
### Released packages
|
||||||
|
|
||||||
|
@ -1564,9 +1564,6 @@ const messages = {
|
|||||||
removeAllLogsModalTitle: 'Remove all logs',
|
removeAllLogsModalTitle: 'Remove all logs',
|
||||||
removeAllLogsModalWarning: 'Are you sure you want to remove all logs?',
|
removeAllLogsModalWarning: 'Are you sure you want to remove all logs?',
|
||||||
definitiveMessageModal: 'This operation is definitive.',
|
definitiveMessageModal: 'This operation is definitive.',
|
||||||
existingSrModalTitle: 'Previous SR Usage',
|
|
||||||
existingSrModalText:
|
|
||||||
'This path has been previously used as a Storage by a XenServer host. All data will be lost if you choose to continue the SR creation.',
|
|
||||||
existingLunModalTitle: 'Previous LUN Usage',
|
existingLunModalTitle: 'Previous LUN Usage',
|
||||||
existingLunModalText:
|
existingLunModalText:
|
||||||
'This LUN has been previously used as a Storage by a XenServer host. All data will be lost if you choose to continue the SR creation.',
|
'This LUN has been previously used as a Storage by a XenServer host. All data will be lost if you choose to continue the SR creation.',
|
||||||
|
@ -269,19 +269,8 @@ export default class New extends Component {
|
|||||||
const { host, iqn, lun, path, type, scsiId, nfs4, nfsOptions } = this.state
|
const { host, iqn, lun, path, type, scsiId, nfs4, nfsOptions } = this.state
|
||||||
|
|
||||||
const createMethodFactories = {
|
const createMethodFactories = {
|
||||||
nfs: async () => {
|
nfs: () =>
|
||||||
const previous = await probeSrNfsExists(host.id, server.value, path)
|
createSrNfs(
|
||||||
if (previous && previous.length > 0) {
|
|
||||||
try {
|
|
||||||
await confirm({
|
|
||||||
title: _('existingSrModalTitle'),
|
|
||||||
body: <p>{_('existingSrModalText')}</p>,
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return createSrNfs(
|
|
||||||
host.id,
|
host.id,
|
||||||
name.value,
|
name.value,
|
||||||
description.value,
|
description.value,
|
||||||
@ -289,8 +278,7 @@ export default class New extends Component {
|
|||||||
path,
|
path,
|
||||||
nfs4 ? '4' : undefined,
|
nfs4 ? '4' : undefined,
|
||||||
nfsOptions
|
nfsOptions
|
||||||
)
|
),
|
||||||
},
|
|
||||||
hba: async () => {
|
hba: async () => {
|
||||||
const previous = await probeSrHbaExists(host.id, scsiId)
|
const previous = await probeSrHbaExists(host.id, scsiId)
|
||||||
if (previous && previous.length > 0) {
|
if (previous && previous.length > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user