From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id CDFE71FF0C0 for ; Wed, 04 Nov 2026 11:58:01 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BCE5421420; Wed, 04 Nov 2026 11:57:56 +0100 (CET) From: Jonas Theisen To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v2 2/2] fix #5001: ui: add context menu with bulk actions for pools in resource tree Date: Wed, 4 Nov 2026 11:57:38 +0100 Message-ID: <20261104105742.164370-2-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261104105742.164370-1-j.theisen@proxmox.com> References: <20261104105742.164370-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793789872547 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.108 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: TIRCRMZPAIYYABHUUJE5MJPWXKTPP34P X-Message-ID-Hash: TIRCRMZPAIYYABHUUJE5MJPWXKTPP34P X-MailFrom: j.theisen@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The pool view groups guests by their pool, but unlike the tag view it offers no context menu on the pool tree-node itself. Add one with the same guest bulk actions as the datacenter and tag menus. The bulk action window opens with the pool filter pre-selected for the pool the menu was opened on. Only guests that are direct members of that pool are selected, guests in nested sub-pools are not, matching how the pool filter works when set manually. Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=5001 Signed-off-by: Jonas Theisen --- www/manager6/Utils.js | 4 ++++ www/manager6/dc/CmdMenu.js | 23 +++++++++++++++++++++++ www/manager6/window/BulkAction.js | 3 +++ 3 files changed, 30 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 8b99371d..ced25763 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -1630,6 +1630,10 @@ Ext.define('PVE.Utils', { menu = Ext.create('PVE.dc.TagCmdMenu', { tag: record.data.tag, }); + } else if (type === 'pool') { + menu = Ext.create('PVE.dc.PoolCmdMenu', { + pool: record.data.pool, + }); } else if (record?.isRoot()) { menu = Ext.create('PVE.dc.CmdMenu', { pveSelNode: record, diff --git a/www/manager6/dc/CmdMenu.js b/www/manager6/dc/CmdMenu.js index 0f010344..a8df2410 100644 --- a/www/manager6/dc/CmdMenu.js +++ b/www/manager6/dc/CmdMenu.js @@ -124,3 +124,26 @@ Ext.define('PVE.dc.TagCmdMenu', { me.callParent(); }, }); + +Ext.define('PVE.dc.PoolCmdMenu', { + extend: 'PVE.dc.CmdMenu', + xtype: 'poolCmdMenu', + + minWidth: 220, + + initComponent: function () { + let me = this; + + if (!me.pool) { + throw 'no pool specified'; + } + + me.title = `${gettext('Pool')} '${me.pool}'`; + + me.extraHandlerArgs = { + prefilterPool: me.pool, + }; + + me.callParent(); + }, +}); diff --git a/www/manager6/window/BulkAction.js b/www/manager6/window/BulkAction.js index 2e3066a3..7e58fb3f 100644 --- a/www/manager6/window/BulkAction.js +++ b/www/manager6/window/BulkAction.js @@ -557,6 +557,9 @@ Ext.define('PVE.window.BulkAction', { if (me.prefilterIncludeTag) { me.down('#includetagfilter').setValue(me.prefilterIncludeTag); } + if (me.prefilterPool) { + me.down('#poolfilter').setValue(me.prefilterPool); + } form.on('validitychange', function () { let valid = form.isValid(); -- 2.47.3