Skip to content

Commit a93f715

Browse files
fix start VMs through group action (#9652)
1 parent 3f5a77e commit a93f715

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ui/src/config/section/compute.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,13 @@ export default {
120120
groupAction: true,
121121
popup: true,
122122
groupMap: (selection, values) => { return selection.map(x => { return { id: x, considerlasthost: values.considerlasthost } }) },
123-
args: ['considerlasthost'],
123+
args: (record, store) => {
124+
if (['Admin'].includes(store.userInfo.roletype)) {
125+
return ['considerlasthost']
126+
}
127+
128+
return []
129+
},
124130
show: (record) => { return ['Stopped'].includes(record.state) },
125131
component: shallowRef(defineAsyncComponent(() => import('@/views/compute/StartVirtualMachine.vue')))
126132
},

0 commit comments

Comments
 (0)