Skip to content

Commit 74b6332

Browse files
author
Hoang Nguyen
authored
ui: VM - hide button take vm volume snapshot for Destroyed state (#5345)
Fixes #5340
1 parent 0390281 commit 74b6332

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ui/src/config/section/compute.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ export default {
181181
docHelp: 'adminguide/virtual_machines.html#virtual-machine-snapshots',
182182
dataView: true,
183183
popup: true,
184+
show: (record) => {
185+
return ((['Running'].includes(record.state) && record.hypervisor !== 'LXC') ||
186+
(['Stopped'].includes(record.state) && !['KVM', 'LXC'].includes(record.hypervisor)))
187+
},
184188
component: () => import('@/views/compute/CreateSnapshotWizard.vue')
185189
},
186190
{

0 commit comments

Comments
 (0)