mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 08:54:32 +00:00
ui: bulk start/stop: align capability checks with backend
The backend requires VM.PowerMgmt, not Sys.PowerMgmt for bulk start and bulk stop. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
4d9e2176e2
commit
0d06378c66
@ -126,9 +126,11 @@ Ext.define('PVE.node.CmdMenu', {
|
||||
if (!caps.vms['VM.Migrate']) {
|
||||
me.getComponent('bulkmigrate').setDisabled(true);
|
||||
}
|
||||
if (!caps.nodes['Sys.PowerMgmt']) {
|
||||
if (!caps.vms['VM.PowerMgmt']) {
|
||||
me.getComponent('bulkstart').setDisabled(true);
|
||||
me.getComponent('bulkstop').setDisabled(true);
|
||||
}
|
||||
if (!caps.nodes['Sys.PowerMgmt']) {
|
||||
me.getComponent('wakeonlan').setDisabled(true);
|
||||
}
|
||||
if (!caps.nodes['Sys.Console']) {
|
||||
|
@ -34,13 +34,13 @@ Ext.define('PVE.node.Config', {
|
||||
var actionBtn = Ext.create('Ext.Button', {
|
||||
text: gettext('Bulk Actions'),
|
||||
iconCls: 'fa fa-fw fa-ellipsis-v',
|
||||
disabled: !caps.nodes['Sys.PowerMgmt'] && !caps.vms['VM.Migrate'],
|
||||
disabled: !caps.vms['VM.PowerMgmt'] && !caps.vms['VM.Migrate'],
|
||||
menu: new Ext.menu.Menu({
|
||||
items: [
|
||||
{
|
||||
text: gettext('Bulk Start'),
|
||||
iconCls: 'fa fa-fw fa-play',
|
||||
disabled: !caps.nodes['Sys.PowerMgmt'],
|
||||
disabled: !caps.vms['VM.PowerMgmt'],
|
||||
handler: function() {
|
||||
Ext.create('PVE.window.BulkAction', {
|
||||
autoShow: true,
|
||||
@ -54,7 +54,7 @@ Ext.define('PVE.node.Config', {
|
||||
{
|
||||
text: gettext('Bulk Shutdown'),
|
||||
iconCls: 'fa fa-fw fa-stop',
|
||||
disabled: !caps.nodes['Sys.PowerMgmt'],
|
||||
disabled: !caps.vms['VM.PowerMgmt'],
|
||||
handler: function() {
|
||||
Ext.create('PVE.window.BulkAction', {
|
||||
autoShow: true,
|
||||
|
Loading…
Reference in New Issue
Block a user