From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v2 2/2] ui: hide bulk migrate options on standalone nodes
Date: Mon, 13 Nov 2023 09:59:31 +0100 [thread overview]
Message-ID: <20231113085931.1126018-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20231113085931.1126018-1-d.csapak@proxmox.com>
since there is nowhere to migrate to and we hide the regular migrate
buttons/options too.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
changes from v1:
* use new 'isStandaloneNode()' from Utils
| 4 ++++
www/manager6/node/Config.js | 1 +
2 files changed, 5 insertions(+)
--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
next prev parent reply other threads:[~2023-11-13 8:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 8:59 [pve-devel] [PATCH manager 1/2] ui: factor out standalone node check Dominik Csapak
2023-11-13 8:59 ` Dominik Csapak [this message]
2023-11-13 10:20 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231113085931.1126018-2-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox