From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Christoph Heiss" <c.heiss@proxmox.com>, <pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH datacenter-manager] ui: auto-installer: allow multi-select of installation entries
Date: Fri, 28 Aug 2026 12:57:49 +0200 [thread overview]
Message-ID: <DL0IUS37HRNP.22DT771NF9FZQ@proxmox.com> (raw)
In-Reply-To: <20260827124033.871256-1-c.heiss@proxmox.com>
On Thu Aug 27, 2026 at 2:40 PM CEST, Christoph Heiss wrote:
> Depending on the environment/usage, a lot of entries of past
> installations can accumulate here over time.
>
> Having the possibility for bulk deletion makes it easier to deal with
> this.
>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Hi, thanks for the patch!
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.
> ---
> .../auto_installer/installations_panel.rs | 38 +++++++++++--------
> 1 file changed, 23 insertions(+), 15 deletions(-)
>
> diff --git a/ui/src/remotes/auto_installer/installations_panel.rs b/ui/src/remotes/auto_installer/installations_panel.rs
> index 2bb52278..c40628e8 100644
> --- a/ui/src/remotes/auto_installer/installations_panel.rs
> +++ b/ui/src/remotes/auto_installer/installations_panel.rs
> @@ -22,7 +22,7 @@ use pwt::{
> tr,
> widget::{
> Button, Toolbar,
> - data_table::{DataTable, DataTableColumn, DataTableHeader},
> + data_table::{DataTable, DataTableColumn, DataTableHeader, MultiSelectMode},
> form::TextArea,
> },
> };
> @@ -77,8 +77,9 @@ impl LoadableComponent for InstallationsPanelComponent {
> type ViewState = ViewState;
>
> fn create(ctx: &LoadableComponentContext<Self>) -> Self {
> - let selection =
> - Selection::new().on_select(ctx.link().callback(|_| Message::SelectionChange));
> + let selection = Selection::new()
> + .multiselect(true)
> + .on_select(ctx.link().callback(|_| Message::SelectionChange));
>
> let store =
> Store::with_extract_key(|record: &Installation| Key::from(record.uuid.to_string()));
> @@ -112,15 +113,18 @@ impl LoadableComponent for InstallationsPanelComponent {
> }
> Self::Message::SelectionChange => true,
> Self::Message::RemoveEntry => {
> - if let Some(key) = self.selection.selected_key() {
> + self.spawn({
> let link = ctx.link().clone();
> - self.spawn(async move {
> - if let Err(err) = delete_entry(key).await {
> - link.show_error(tr!("Unable to delete entry"), err, true);
> + let selection = self.selection.clone();
> + async move {
> + for key in selection.selected_keys() {
> + if let Err(err) = delete_entry(key).await {
> + link.show_error(tr!("Unable to delete entry {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.
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.
> link.send_reload();
> - })
> - }
> + }
> + });
> false
> }
> }
prev parent reply other threads:[~2026-08-28 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 12:40 [PATCH datacenter-manager] ui: auto-installer: allow multi-select of installation entries Christoph Heiss
2026-08-28 10:57 ` Lukas Wagner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DL0IUS37HRNP.22DT771NF9FZQ@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=c.heiss@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox