mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-09 02:38:26 +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']) {
|
if (!caps.vms['VM.Migrate']) {
|
||||||
me.getComponent('bulkmigrate').setDisabled(true);
|
me.getComponent('bulkmigrate').setDisabled(true);
|
||||||
}
|
}
|
||||||
if (!caps.nodes['Sys.PowerMgmt']) {
|
if (!caps.vms['VM.PowerMgmt']) {
|
||||||
me.getComponent('bulkstart').setDisabled(true);
|
me.getComponent('bulkstart').setDisabled(true);
|
||||||
me.getComponent('bulkstop').setDisabled(true);
|
me.getComponent('bulkstop').setDisabled(true);
|
||||||
|
}
|
||||||
|
if (!caps.nodes['Sys.PowerMgmt']) {
|
||||||
me.getComponent('wakeonlan').setDisabled(true);
|
me.getComponent('wakeonlan').setDisabled(true);
|
||||||
}
|
}
|
||||||
if (!caps.nodes['Sys.Console']) {
|
if (!caps.nodes['Sys.Console']) {
|
||||||
|
@ -34,13 +34,13 @@ Ext.define('PVE.node.Config', {
|
|||||||
var actionBtn = Ext.create('Ext.Button', {
|
var actionBtn = Ext.create('Ext.Button', {
|
||||||
text: gettext('Bulk Actions'),
|
text: gettext('Bulk Actions'),
|
||||||
iconCls: 'fa fa-fw fa-ellipsis-v',
|
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({
|
menu: new Ext.menu.Menu({
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
text: gettext('Bulk Start'),
|
text: gettext('Bulk Start'),
|
||||||
iconCls: 'fa fa-fw fa-play',
|
iconCls: 'fa fa-fw fa-play',
|
||||||
disabled: !caps.nodes['Sys.PowerMgmt'],
|
disabled: !caps.vms['VM.PowerMgmt'],
|
||||||
handler: function() {
|
handler: function() {
|
||||||
Ext.create('PVE.window.BulkAction', {
|
Ext.create('PVE.window.BulkAction', {
|
||||||
autoShow: true,
|
autoShow: true,
|
||||||
@ -54,7 +54,7 @@ Ext.define('PVE.node.Config', {
|
|||||||
{
|
{
|
||||||
text: gettext('Bulk Shutdown'),
|
text: gettext('Bulk Shutdown'),
|
||||||
iconCls: 'fa fa-fw fa-stop',
|
iconCls: 'fa fa-fw fa-stop',
|
||||||
disabled: !caps.nodes['Sys.PowerMgmt'],
|
disabled: !caps.vms['VM.PowerMgmt'],
|
||||||
handler: function() {
|
handler: function() {
|
||||||
Ext.create('PVE.window.BulkAction', {
|
Ext.create('PVE.window.BulkAction', {
|
||||||
autoShow: true,
|
autoShow: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user