From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id C20821FF0B7 for ; Fri, 30 Oct 2026 11:07:17 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9052F21482; Fri, 30 Oct 2026 11:07:13 +0100 (CET) From: Jonas Theisen To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager] fix #5001: ui: add context menu with bulk actions for pools in resource tree Date: Fri, 30 Oct 2026 11:06:18 +0100 Message-ID: <20261030100700.82807-1-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793354826232 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.111 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: VSE2XTWXFXM6N4H4NVC2FESVZOPMI6HH X-Message-ID-Hash: VSE2XTWXFXM6N4H4NVC2FESVZOPMI6HH 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 | 26 ++++++++++++++++++++++++++ www/manager6/window/BulkAction.js | 3 +++ 3 files changed, 33 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 5bb4d7d1..f47132ee 100644 --- a/www/manager6/dc/CmdMenu.js +++ b/www/manager6/dc/CmdMenu.js @@ -127,3 +127,29 @@ 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}'`; + if (PVE.ClusterName?.length) { + me.title += ` (${PVE.ClusterName})`; + } + + 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