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 ED6EB1FF0B4 for ; Tue, 08 Sep 2026 12:56:52 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 90DB121420; Tue, 08 Sep 2026 12:56:52 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 08 Sep 2026 12:56:47 +0200 Message-Id: Subject: Re: [PATCH datacenter-manager] ui: auto-installer: allow multi-select of installation entries From: "Christoph Heiss" To: "Lukas Wagner" X-Mailer: aerc 0.22.0 References: <20260827124033.871256-1-c.heiss@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788865000530 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.333 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: 6P7OG3D3TXAMJ6Z367UXQBSVW2EPAPQP X-Message-ID-Hash: 6P7OG3D3TXAMJ6Z367UXQBSVW2EPAPQP X-MailFrom: c.heiss@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 CC: pdm-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Thanks for the review! On Fri Aug 28, 2026 at 12:57 PM CEST, Lukas Wagner wrote: [..] > I think the UX could be improved a bit. Right now, it's a bit weird that > *any* click on the row automatically selects it. For instance, when > going through entries one by one to show the "System Information", this > is a bit annoying, since one cannot press the 'System Information' > button if multiple entries are selected. > > I think this could be solved in two ways: > > - Require the user to explicitly enable 'bulk-select', e.g. by > pressing a button or ticking a check-box in the header. Before doing > so, the checkbox column could be hidden > > - Patch 'DataTable' so that only a click on the checkbox selects the > entry, but not when clicking anywhere else. This probably needs to > be configurable, not sure if we don't break other UIs if we do that. > > > I think the first option could be the preferable one. Makes sense. I'll see and will try out what works and fits better. I also guess we don't have that pattern of UI somewhere else yet, which could be taken as reference? [..] >> Self::Message::RemoveEntry =3D> { >> - if let Some(key) =3D self.selection.selected_key() { >> + self.spawn({ >> let link =3D ctx.link().clone(); >> - self.spawn(async move { >> - if let Err(err) =3D delete_entry(key).await { >> - link.show_error(tr!("Unable to delete entry= "), err, true); >> + let selection =3D self.selection.clone(); >> + async move { >> + for key in selection.selected_keys() { >> + if let Err(err) =3D delete_entry(key).await= { >> + link.show_error(tr!("Unable to delete e= ntry {key}"), err, true); >> + } >> } > > I guess in most cases a 'bulk-remove' API endpoint is preferable, mostly > to at least *enable* atomicity at the API level. But since removing > installations ends up removing individual files any way, which is > inherently not atomic, I guess the current approach is fine as well. Yeah, thought about that too - but kept it simple here on purpose (as you described) for now. > > If we ever end up storing installations in something that supports > atomic operations (say, a sqlite DB or a single JSON file), a > bulk-delete endpoint can be added as well. >