[pve-devel] [PATCH manager] ui: hide bulk migrate options on standalone nodes
Dominik Csapak
d.csapak at proxmox.com
Fri Nov 10 11:05:53 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>
---
www/manager6/node/CmdMenu.js | 5 +++++
www/manager6/node/Config.js | 2 ++
2 files changed, 7 insertions(+)
diff --git a/www/manager6/node/CmdMenu.js b/www/manager6/node/CmdMenu.js
index dc56ef08..f5f9fae3 100644
--- a/www/manager6/node/CmdMenu.js
+++ b/www/manager6/node/CmdMenu.js
@@ -139,5 +139,10 @@ Ext.define('PVE.node.CmdMenu', {
if (me.pveSelNode.data.running) {
me.getComponent('wakeonlan').setDisabled(true);
}
+
+ let standalone = PVE.data.ResourceStore.getNodes().length < 2;
+ if (standalone) {
+ me.getComponent('bulkmigrate').setVisible(false);
+ }
},
});
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index 6ed2172a..00a0e713 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -11,6 +11,7 @@ Ext.define('PVE.node.Config', {
if (!nodename) {
throw "no node name specified";
}
+ let standalone = PVE.data.ResourceStore.getNodes().length < 2;
var caps = Ext.state.Manager.get('GuiCap');
@@ -69,6 +70,7 @@ Ext.define('PVE.node.Config', {
text: gettext('Bulk Migrate'),
iconCls: 'fa fa-fw fa-send-o',
disabled: !caps.vms['VM.Migrate'],
+ hidden: standalone,
handler: function() {
Ext.create('PVE.window.BulkAction', {
autoShow: true,
--
2.30.2
More information about the pve-devel
mailing list