ui: VM - hide button take vm volume snapshot for Destroyed state (#5345)

Fixes #5340
This commit is contained in:
Hoang Nguyen 2021-08-24 14:14:05 +07:00 committed by GitHub
parent 0390281ad2
commit 74b6332572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,10 @@ export default {
docHelp: 'adminguide/virtual_machines.html#virtual-machine-snapshots',
dataView: true,
popup: true,
show: (record) => {
return ((['Running'].includes(record.state) && record.hypervisor !== 'LXC') ||
(['Stopped'].includes(record.state) && !['KVM', 'LXC'].includes(record.hypervisor)))
},
component: () => import('@/views/compute/CreateSnapshotWizard.vue')
},
{