ui bug fix: scalevm is disabled when vm is Stopped (#5233)

* ui: scalevm is disabled even if vm is Stopped

* ui: update #5233
This commit is contained in:
Wei Zhou 2021-07-26 13:28:42 +02:00 committed by GitHub
parent b065e79ae3
commit 7678bc1293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,7 +299,7 @@ export default {
docHelp: 'adminguide/virtual_machines.html#how-to-dynamically-scale-cpu-and-ram',
dataView: true,
show: (record) => { return ['Stopped'].includes(record.state) || (['Running'].includes(record.state) && record.hypervisor !== 'KVM' && record.hypervisor !== 'LXC') },
disabled: (record) => { return !record.isdynamicallyscalable },
disabled: (record) => { return record.state === 'Running' && !record.isdynamicallyscalable },
popup: true,
component: () => import('@/views/compute/ScaleVM.vue')
},