feat(xo-web/SR/disks): disable actions on unmanaged VDIs (#4000)
Fixes #3988
This commit is contained in:
parent
8150d3110c
commit
5ba170bf1f
@ -2,6 +2,8 @@
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [SR/Disk] Disable actions on unmanaged VDIs [#3988](https://github.com/vatesfr/xen-orchestra/issues/3988) (PR [#4000](https://github.com/vatesfr/xen-orchestra/pull/4000))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- [New network] PIF was wrongly required which prevented from creating a private network (PR [#4010](https://github.com/vatesfr/xen-orchestra/pull/4010))
|
||||
|
@ -182,6 +182,7 @@ const COLUMNS = [
|
||||
|
||||
const GROUPED_ACTIONS = [
|
||||
{
|
||||
disabled: vdis => some(vdis, { type: 'VDI-unmanaged' }),
|
||||
handler: deleteVdis,
|
||||
icon: 'delete',
|
||||
label: _('deleteSelectedVdis'),
|
||||
@ -193,12 +194,14 @@ const INDIVIDUAL_ACTIONS = [
|
||||
...(process.env.XOA_PLAN > 1
|
||||
? [
|
||||
{
|
||||
disabled: ({ id }, { isVdiAttached }) => isVdiAttached[id],
|
||||
disabled: ({ id, type }, { isVdiAttached }) =>
|
||||
isVdiAttached[id] || type === 'VDI-unmanaged',
|
||||
handler: importVdi,
|
||||
icon: 'import',
|
||||
label: _('importVdi'),
|
||||
},
|
||||
{
|
||||
disabled: ({ type }) => type === 'VDI-unmanaged',
|
||||
handler: exportVdi,
|
||||
icon: 'export',
|
||||
label: _('exportVdi'),
|
||||
@ -211,6 +214,7 @@ const INDIVIDUAL_ACTIONS = [
|
||||
label: vdi => _('copyUuid', { uuid: vdi.uuid }),
|
||||
},
|
||||
{
|
||||
disabled: ({ type }) => type === 'VDI-unmanaged',
|
||||
handler: deleteVdi,
|
||||
icon: 'delete',
|
||||
label: _('deleteSelectedVdi'),
|
||||
|
Loading…
Reference in New Issue
Block a user