chore(xo-web/health): remove irrelevant actions on VDIs (#2882)
This commit is contained in:
parent
7a5229741f
commit
3d869d9fa1
@ -817,7 +817,6 @@ const messages = {
|
|||||||
vdiMigrateAll: 'Migrate all VDIs',
|
vdiMigrateAll: 'Migrate all VDIs',
|
||||||
vdiMigrateNoSr: 'No SR',
|
vdiMigrateNoSr: 'No SR',
|
||||||
vdiMigrateNoSrMessage: 'A target SR is required to migrate a VDI',
|
vdiMigrateNoSrMessage: 'A target SR is required to migrate a VDI',
|
||||||
vdiDelete: 'Delete VDI',
|
|
||||||
vdiForget: 'Forget',
|
vdiForget: 'Forget',
|
||||||
vdiRemove: 'Remove VDI',
|
vdiRemove: 'Remove VDI',
|
||||||
noControlDomainVdis: 'No VDIs attached to Control Domain',
|
noControlDomainVdis: 'No VDIs attached to Control Domain',
|
||||||
@ -828,7 +827,6 @@ const messages = {
|
|||||||
vbdNoVbd: 'No disks',
|
vbdNoVbd: 'No disks',
|
||||||
vbdConnect: 'Connect VBD',
|
vbdConnect: 'Connect VBD',
|
||||||
vbdDisconnect: 'Disconnect VBD',
|
vbdDisconnect: 'Disconnect VBD',
|
||||||
vbdsDisconnect: 'Disconnect VBDs',
|
|
||||||
vbdBootable: 'Bootable',
|
vbdBootable: 'Bootable',
|
||||||
vbdReadonly: 'Readonly',
|
vbdReadonly: 'Readonly',
|
||||||
vbdAction: 'Action',
|
vbdAction: 'Action',
|
||||||
|
@ -14,7 +14,7 @@ import { Card, CardHeader, CardBlock } from 'card'
|
|||||||
import { confirm } from 'modal'
|
import { confirm } from 'modal'
|
||||||
import { connectStore, formatSize, noop, resolveIds } from 'utils'
|
import { connectStore, formatSize, noop, resolveIds } from 'utils'
|
||||||
import { Container, Row, Col } from 'grid'
|
import { Container, Row, Col } from 'grid'
|
||||||
import { flatten, get, includes, isEmpty, map, mapValues, some } from 'lodash'
|
import { flatten, get, includes, isEmpty, map, mapValues } from 'lodash'
|
||||||
import { FormattedRelative, FormattedTime } from 'react-intl'
|
import { FormattedRelative, FormattedTime } from 'react-intl'
|
||||||
import { fromCallback } from 'promise-toolbox'
|
import { fromCallback } from 'promise-toolbox'
|
||||||
import { SelectPool } from 'select-objects'
|
import { SelectPool } from 'select-objects'
|
||||||
@ -24,10 +24,7 @@ import {
|
|||||||
deleteVbd,
|
deleteVbd,
|
||||||
deleteVbds,
|
deleteVbds,
|
||||||
deleteVdi,
|
deleteVdi,
|
||||||
deleteVdis,
|
|
||||||
deleteVm,
|
deleteVm,
|
||||||
disconnectVbd,
|
|
||||||
disconnectVbds,
|
|
||||||
isSrWritable,
|
isSrWritable,
|
||||||
} from 'xo'
|
} from 'xo'
|
||||||
import {
|
import {
|
||||||
@ -179,16 +176,6 @@ const ORPHANED_VDI_COLUMNS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
const CONTROL_DOMAIN_VDIS_ACTIONS = [
|
const CONTROL_DOMAIN_VDIS_ACTIONS = [
|
||||||
{
|
|
||||||
disabled: selectedItems => some(selectedItems, ({ vbd }) => !vbd.attached),
|
|
||||||
handler: disconnectVbds,
|
|
||||||
icon: 'disconnect',
|
|
||||||
individualDisabled: ({ vbd }) => !vbd.attached,
|
|
||||||
individualHandler: disconnectVbd,
|
|
||||||
individualLabel: _('vbdDisconnect'),
|
|
||||||
label: _('vbdsDisconnect'),
|
|
||||||
level: 'danger',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
handler: deleteVbds,
|
handler: deleteVbds,
|
||||||
individualHandler: deleteVbd,
|
individualHandler: deleteVbd,
|
||||||
@ -196,14 +183,6 @@ const CONTROL_DOMAIN_VDIS_ACTIONS = [
|
|||||||
label: _('vdiForget'),
|
label: _('vdiForget'),
|
||||||
level: 'danger',
|
level: 'danger',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
handler: selectedItems => deleteVdis(map(selectedItems, 'vdi')),
|
|
||||||
icon: 'delete',
|
|
||||||
individualHandler: ({ vdi }) => deleteVdi(vdi),
|
|
||||||
individualLabel: _('vdiDelete'),
|
|
||||||
label: _('deleteSelectedVdis'),
|
|
||||||
level: 'danger',
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const AttachedVdisTable = [
|
const AttachedVdisTable = [
|
||||||
|
Loading…
Reference in New Issue
Block a user