[pve-devel] [PATCH manager v2 2/2] ui: hide bulk migrate options on standalone nodes

Dominik Csapak d.csapak at proxmox.com
Mon Nov 13 09:59:31 CET 2023


since there is nowhere to migrate to and we hide the regular migrate
buttons/options too.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* use new 'isStandaloneNode()' from Utils

 www/manager6/node/CmdMenu.js | 4 ++++
 www/manager6/node/Config.js  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/www/manager6/node/CmdMenu.js b/www/manager6/node/CmdMenu.js
index dc56ef08..1dbcd781 100644
--- a/www/manager6/node/CmdMenu.js
+++ b/www/manager6/node/CmdMenu.js
@@ -139,5 +139,9 @@ Ext.define('PVE.node.CmdMenu', {
 	if (me.pveSelNode.data.running) {
 	    me.getComponent('wakeonlan').setDisabled(true);
 	}
+
+	if (PVE.Utils.isStandaloneNode()) {
+	    me.getComponent('bulkmigrate').setVisible(false);
+	}
     },
 });
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index 6ed2172a..6deafcdf 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -69,6 +69,7 @@ Ext.define('PVE.node.Config', {
 			text: gettext('Bulk Migrate'),
 			iconCls: 'fa fa-fw fa-send-o',
 			disabled: !caps.vms['VM.Migrate'],
+			hidden: PVE.Utils.isStandaloneNode(),
 			handler: function() {
 			    Ext.create('PVE.window.BulkAction', {
 				autoShow: true,
-- 
2.30.2






More information about the pve-devel mailing list