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 DE1421FF09B for ; Mon, 31 Aug 2026 15:43:06 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 16FF820954; Mon, 31 Aug 2026 15:43:06 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 31 Aug 2026 15:43:00 +0200 Message-Id: Subject: Re: [pve-devel] [PATCH manager v2] ui: pool create: allow selecting parent pool via selector From: "Jakob Klocker" To: "Proxmox VE development discussion" X-Mailer: aerc 0.20.0 References: <20260123074546.396323-1-d.csapak@proxmox.com> In-Reply-To: <20260123074546.396323-1-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788183767627 X-SPAM-LEVEL: Spam detection results: 0 AWL 1.680 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: VP2UQVAP5LWS2D5XJMXNQ3OQVNBCLVKV X-Message-ID-Hash: VP2UQVAP5LWS2D5XJMXNQ3OQVNBCLVKV X-MailFrom: j.klocker@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: Thanks for the patch. Tested on top of current master. Went through: - creating a top-level pool (no parent selected) -- submits the plain name - creating child and grandchild pools via the selector (`a/b`, `a/b/c`) - the name field rejects slashes, preventing pool creation - selector is hidden in edit mode - adding a child under parents with max depth shows an error - checking that `parentPool` isn't submited Not touched, but made sure it still works: - Permissions -- gave a user rights to `a/b`, confirmed it can't edit `a` - can't remove a parent while it still has children Everything works as expected. One thing that _could_ be added: hiding parents already at max depth (3), since children can't be created under them. Though one=20 could argue the current behavior -- keeping them and showing the correct error -- is better, so users aren't confused about why those pools are missing. Code looks good to me as well, consider this: Reviewed-by: Jakob Klocker Tested-by: Jakob Klocker On Fri Jan 23, 2026 at 8:42 AM CET, 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(-) > [SNIP]