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))
|
- [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))
|
- [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))
|
- 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
|
### Bug fixes
|
||||||
|
|
||||||
|
@ -595,6 +595,7 @@ const messages = {
|
|||||||
rebootVmLabel: 'Reboot',
|
rebootVmLabel: 'Reboot',
|
||||||
forceRebootVmLabel: 'Force reboot',
|
forceRebootVmLabel: 'Force reboot',
|
||||||
deleteVmLabel: 'Delete',
|
deleteVmLabel: 'Delete',
|
||||||
|
deleteSelectedVmsLabel: 'Delete selected VMs',
|
||||||
migrateVmLabel: 'Migrate',
|
migrateVmLabel: 'Migrate',
|
||||||
snapshotVmLabel: 'Snapshot',
|
snapshotVmLabel: 'Snapshot',
|
||||||
exportVmLabel: 'Export',
|
exportVmLabel: 'Export',
|
||||||
|
@ -25,6 +25,7 @@ import {
|
|||||||
deleteVbds,
|
deleteVbds,
|
||||||
deleteVdi,
|
deleteVdi,
|
||||||
deleteVm,
|
deleteVm,
|
||||||
|
deleteVms,
|
||||||
isSrWritable,
|
isSrWritable,
|
||||||
} from 'xo'
|
} from 'xo'
|
||||||
import {
|
import {
|
||||||
@ -306,16 +307,16 @@ const VM_COLUMNS = [
|
|||||||
name: _('vmContainer'),
|
name: _('vmContainer'),
|
||||||
itemRenderer: vm => <VmColContainer id={vm.$container} />,
|
itemRenderer: vm => <VmColContainer id={vm.$container} />,
|
||||||
},
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
const VM_ACTIONS = [
|
||||||
{
|
{
|
||||||
name: _('logAction'),
|
handler: deleteVms,
|
||||||
itemRenderer: vm => (
|
individualHandler: deleteVm,
|
||||||
<ActionRowButton
|
individualLabel: _('deleteVmLabel'),
|
||||||
btnStyle='danger'
|
icon: 'delete',
|
||||||
handler={deleteVm}
|
label: _('deleteSelectedVmsLabel'),
|
||||||
handlerParam={vm}
|
level: 'danger',
|
||||||
icon='delete'
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -598,6 +599,7 @@ export default class Health extends Component {
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardBlock>
|
<CardBlock>
|
||||||
<NoObjects
|
<NoObjects
|
||||||
|
actions={VM_ACTIONS}
|
||||||
collection={
|
collection={
|
||||||
props.areObjectsFetched ? this._getVmOrphaned() : null
|
props.areObjectsFetched ? this._getVmOrphaned() : null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user