Skip to content

Commit 1fbfefb

Browse files
bernardodemarcodhslove
authored andcommitted
fix start VMs through group action (apache#9652)
1 parent 983540e commit 1fbfefb

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
@@ -128,7 +128,13 @@ export default {
128128
groupAction: true,
129129
popup: true,
130130
groupMap: (selection, values) => { return selection.map(x => { return { id: x, considerlasthost: values.considerlasthost } }) },
131-
args: ['considerlasthost'],
131+
args: (record, store) => {
132+
if (['Admin'].includes(store.userInfo.roletype)) {
133+
return ['considerlasthost']
134+
}
135+
136+
return []
137+
},
132138
show: (record) => { return ['Stopped'].includes(record.state) },
133139
component: shallowRef(defineAsyncComponent(() => import('@/views/compute/StartVirtualMachine.vue')))
134140
},

0 commit comments

Comments
 (0)