feat(xo-web/health/orphanedVms): use SortedTable actions (#3274)
See #3179
This commit is contained in:
parent
c7c205d52f
commit
7ad4fc0e6c
@ -7,6 +7,7 @@
|
||||
- [Remotes] Make SMB subfolder field optional [#3249](https://github.com/vatesfr/xen-orchestra/issues/3249) (PR [#3250](https://github.com/vatesfr/xen-orchestra/pull/3250))
|
||||
- [Backup NG form] Make the smart mode's toggle more visible [#2711](https://github.com/vatesfr/xen-orchestra/issues/2711) (PR [#3263](https://github.com/vatesfr/xen-orchestra/pull/3263))
|
||||
- Move the copy clipboard of the VM's UUID to the header [#3221](https://github.com/vatesfr/xen-orchestra/issues/3221) (PR [#3248](https://github.com/vatesfr/xen-orchestra/pull/3248))
|
||||
- [Health / Orphaned VMs] Homogenize action buttons in table and enable bulk deletion [#3179](https://github.com/vatesfr/xen-orchestra/issues/3179) (PR [#3274](https://github.com/vatesfr/xen-orchestra/pull/3274))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -595,6 +595,7 @@ const messages = {
|
||||
rebootVmLabel: 'Reboot',
|
||||
forceRebootVmLabel: 'Force reboot',
|
||||
deleteVmLabel: 'Delete',
|
||||
deleteSelectedVmsLabel: 'Delete selected VMs',
|
||||
migrateVmLabel: 'Migrate',
|
||||
snapshotVmLabel: 'Snapshot',
|
||||
exportVmLabel: 'Export',
|
||||
|
@ -25,6 +25,7 @@ import {
|
||||
deleteVbds,
|
||||
deleteVdi,
|
||||
deleteVm,
|
||||
deleteVms,
|
||||
isSrWritable,
|
||||
} from 'xo'
|
||||
import {
|
||||
@ -306,16 +307,16 @@ const VM_COLUMNS = [
|
||||
name: _('vmContainer'),
|
||||
itemRenderer: vm => <VmColContainer id={vm.$container} />,
|
||||
},
|
||||
]
|
||||
|
||||
const VM_ACTIONS = [
|
||||
{
|
||||
name: _('logAction'),
|
||||
itemRenderer: vm => (
|
||||
<ActionRowButton
|
||||
btnStyle='danger'
|
||||
handler={deleteVm}
|
||||
handlerParam={vm}
|
||||
icon='delete'
|
||||
/>
|
||||
),
|
||||
handler: deleteVms,
|
||||
individualHandler: deleteVm,
|
||||
individualLabel: _('deleteVmLabel'),
|
||||
icon: 'delete',
|
||||
label: _('deleteSelectedVmsLabel'),
|
||||
level: 'danger',
|
||||
},
|
||||
]
|
||||
|
||||
@ -598,6 +599,7 @@ export default class Health extends Component {
|
||||
</CardHeader>
|
||||
<CardBlock>
|
||||
<NoObjects
|
||||
actions={VM_ACTIONS}
|
||||
collection={
|
||||
props.areObjectsFetched ? this._getVmOrphaned() : null
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user