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 611E01FF09B for ; Mon, 31 Aug 2026 16:03:25 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id EE0082126C; Mon, 31 Aug 2026 16:03:24 +0200 (CEST) Message-ID: <6a9f8cca-061f-4eee-8d10-ccf4ed842e39@proxmox.com> Date: Mon, 31 Aug 2026 16:03:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [pve-devel] [PATCH manager v2] ui: pool create: allow selecting parent pool via selector Content-Language: en-US To: Proxmox VE development discussion , Dominik Csapak References: <20260123074546.396323-1-d.csapak@proxmox.com> From: Aaron Lauterer In-Reply-To: <20260123074546.396323-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788184986866 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.631 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: MSU624FSSBGGABVCZPO2TBORJR4VONN5 X-Message-ID-Hash: MSU624FSSBGGABVCZPO2TBORJR4VONN5 X-MailFrom: a.lauterer@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: Gave this a quick test. Works as expected. I guess that handling the 3rd level pools differently but still showing them in the selector with a marking and not selectable will make the whole thing a lot more complex. As in, a custom component potentially, if the pvePoolSelector cannot do it. Tested-By: Aaron Lauterer On 2026-01-23 08:44, Dominik Csapak wrote: > instead of having to type out the full path, e.g. 'foo/bar/baz', > show a 'pool selector' to select the parent pool. > > Forbid using slashes in the name field so it's not possible to specify > the structure with both the name and parent pool field. > > This makes creating nested pools more obvious and easier. > > Signed-off-by: Dominik Csapak > --- > changes from v1: > * always delete 'parentPool' from values so we don't accidentally submit it > * only consider parentPool if it's a non-empty string > * add regex to the namefield to disallow slashes > * add emptyText to the poolselector > > www/manager6/dc/PoolEdit.js | 52 +++++++++++++++++++++++++++---------- > 1 file changed, 39 insertions(+), 13 deletions(-) > > diff --git a/www/manager6/dc/PoolEdit.js b/www/manager6/dc/PoolEdit.js > index 72a084ac..ee39137a 100644 > --- a/www/manager6/dc/PoolEdit.js > +++ b/www/manager6/dc/PoolEdit.js > @@ -17,20 +17,46 @@ Ext.define('PVE.dc.PoolEdit', { > > items: [ > { > - xtype: 'pmxDisplayEditField', > - fieldLabel: gettext('Name'), > - cbind: { > - editable: '{isCreate}', > - value: '{poolid}', > + xtype: 'inputpanel', > + onGetValues: function (values) { > + if (Ext.isString(values.parentPool) && values.parentPool.length > 0) { > + values.poolid = values.parentPool + '/' + values.poolid; > + } > + delete values.parentPool; > + return values; > }, > - name: 'poolid', > - allowBlank: false, > - }, > - { > - xtype: 'textfield', > - fieldLabel: gettext('Comment'), > - name: 'comment', > - allowBlank: true, > + items: [ > + { > + xtype: 'pmxDisplayEditField', > + fieldLabel: gettext('Name'), > + cbind: { > + editable: '{isCreate}', > + value: '{poolid}', > + }, > + editConfig: { > + regex: /^[^/]+$/, > + }, > + name: 'poolid', > + allowBlank: false, > + }, > + { > + xtype: 'pvePoolSelector', > + name: 'parentPool', > + fieldLabel: gettext('Parent Pool'), > + allowBlank: true, > + emptyText: Proxmox.Utils.NoneText, > + cbind: { > + disabled: '{!isCreate}', > + hidden: '{!isCreate}', > + }, > + }, > + { > + xtype: 'textfield', > + fieldLabel: gettext('Comment'), > + name: 'comment', > + allowBlank: true, > + }, > + ], > }, > ], >