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))
|
||||
- [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))
|
||||
- [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
|
||||
|
||||
|
@ -1564,9 +1564,6 @@ const messages = {
|
||||
removeAllLogsModalTitle: 'Remove all logs',
|
||||
removeAllLogsModalWarning: 'Are you sure you want to remove all logs?',
|
||||
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',
|
||||
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.',
|
||||
|
@ -269,19 +269,8 @@ export default class New extends Component {
|
||||
const { host, iqn, lun, path, type, scsiId, nfs4, nfsOptions } = this.state
|
||||
|
||||
const createMethodFactories = {
|
||||
nfs: async () => {
|
||||
const previous = await probeSrNfsExists(host.id, server.value, path)
|
||||
if (previous && previous.length > 0) {
|
||||
try {
|
||||
await confirm({
|
||||
title: _('existingSrModalTitle'),
|
||||
body: <p>{_('existingSrModalText')}</p>,
|
||||
})
|
||||
} catch (error) {
|
||||
return
|
||||
}
|
||||
}
|
||||
return createSrNfs(
|
||||
nfs: () =>
|
||||
createSrNfs(
|
||||
host.id,
|
||||
name.value,
|
||||
description.value,
|
||||
@ -289,8 +278,7 @@ export default class New extends Component {
|
||||
path,
|
||||
nfs4 ? '4' : undefined,
|
||||
nfsOptions
|
||||
)
|
||||
},
|
||||
),
|
||||
hba: async () => {
|
||||
const previous = await probeSrHbaExists(host.id, scsiId)
|
||||
if (previous && previous.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user