feat(xo-web/forgetSR): improve the modal window message
This commit is contained in:
@@ -2372,9 +2372,9 @@ const messages = {
|
||||
'This will disconnect each selected SR from its host (local SR) or from every hosts of its pool (shared SR).',
|
||||
srForgetModalTitle: 'Forget SR',
|
||||
srsForgetModalTitle: 'Forget selected SRs',
|
||||
srForgetModalMessage: "Are you sure you want to forget this SR? VDIs on this storage won't be removed.",
|
||||
srForgetModalMessage: "Are you sure you want to forget this SR? You will lose all the metadata for it, meaning all the links between the VDIs (disks) and their respective VMs. This operation cannot be undone.",
|
||||
srsForgetModalMessage:
|
||||
"Are you sure you want to forget all the selected SRs? VDIs on these storages won't be removed.",
|
||||
"Are you sure you want to forget {nPbds, number} SR{nPbds, plural, one {} other {s}}? You will lose all the metadata for it, meaning all the links between the VDIs (disks) and their respective VMs. This operation cannot be undone.",
|
||||
srAllDisconnected: 'Disconnected',
|
||||
srSomeConnected: 'Partially connected',
|
||||
srAllConnected: 'Connected',
|
||||
|
||||
@@ -2268,15 +2268,31 @@ export const deleteSr = sr =>
|
||||
|
||||
export const fetchSrStats = (sr, granularity) => _call('sr.stats', { id: resolveId(sr), granularity })
|
||||
|
||||
export const forgetSr = sr =>
|
||||
export const forgetSr = sr => {
|
||||
confirm({
|
||||
title: _('srForgetModalTitle'),
|
||||
body: _('srForgetModalMessage'),
|
||||
}).then(() => _call('sr.forget', { id: resolveId(sr) }), noop)
|
||||
body: (
|
||||
<div className='text-warning'>
|
||||
<p className='font-weight-bold'>{_('srForgetModalMessage')}</p>
|
||||
</div>
|
||||
),
|
||||
strongConfirm: {
|
||||
messageId: 'srForget',
|
||||
},
|
||||
}).then(() => _call('sr.forget', { id: resolveId(sr) }), noop);
|
||||
};
|
||||
|
||||
export const forgetSrs = srs =>
|
||||
confirm({
|
||||
title: _('srsForgetModalTitle'),
|
||||
body: _('srsForgetModalMessage'),
|
||||
body: (
|
||||
<div className='text-warning'>
|
||||
<p className='font-weight-bold'>{_('srsForgetModalMessage')}</p>
|
||||
</div>
|
||||
),
|
||||
strongConfirm: {
|
||||
messageId: 'srsForget',
|
||||
},
|
||||
}).then(() => Promise.all(map(resolveIds(srs), id => _call('sr.forget', { id }))), noop)
|
||||
|
||||
export const reconnectAllHostsSr = sr =>
|
||||
|
||||
Reference in New Issue
Block a user