fix start VMs through group action (#9652)

This commit is contained in:
Bernardo De Marco Gonçalves 2024-09-09 09:38:42 -03:00 committed by GitHub
parent 3f5a77ef58
commit a93f7154a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,7 +120,13 @@ export default {
groupAction: true, groupAction: true,
popup: true, popup: true,
groupMap: (selection, values) => { return selection.map(x => { return { id: x, considerlasthost: values.considerlasthost } }) }, groupMap: (selection, values) => { return selection.map(x => { return { id: x, considerlasthost: values.considerlasthost } }) },
args: ['considerlasthost'], args: (record, store) => {
if (['Admin'].includes(store.userInfo.roletype)) {
return ['considerlasthost']
}
return []
},
show: (record) => { return ['Stopped'].includes(record.state) }, show: (record) => { return ['Stopped'].includes(record.state) },
component: shallowRef(defineAsyncComponent(() => import('@/views/compute/StartVirtualMachine.vue'))) component: shallowRef(defineAsyncComponent(() => import('@/views/compute/StartVirtualMachine.vue')))
}, },