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 04E0B1FF0B2 for ; Mon, 24 Aug 2026 09:49:53 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 32AF5213C3; Mon, 24 Aug 2026 09:49:52 +0200 (CEST) From: Lukas Wagner To: yew-devel@lists.proxmox.com Subject: [PATCH proxmox-yew-comp] fix #7963: acme: filter ACME DNS Plugins by their human-readable name Date: Mon, 24 Aug 2026 09:49:47 +0200 Message-ID: <20260824074947.91606-1-l.wagner@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: 1787557758624 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.678 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: W4CMKRCHMMQEIHFRSRGN2GBRBUS757VD X-Message-ID-Hash: W4CMKRCHMMQEIHFRSRGN2GBRBUS757VD X-MailFrom: l.wagner@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: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In the picker, we only show the human-readable plugin name. For some plugins, this name differs from the actual plugin id (example: "Cloudflare Managed DNS" has id "cf"), which makes filtering behavior unexpected for users. Fixed by setting a custom filter function for the underlying GridPicker. The filter function uses `contains` instead of `starts_with`, as doing so makes it easier to find certain plugins where human-readable name does not start with most commonly used term for the service. For instance, some users might type `aws` or `route 53` to find the `Amazon Route 53 (AWS)` plugin. Signed-off-by: Lukas Wagner --- src/acme/acme_challenge_selector.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/acme/acme_challenge_selector.rs b/src/acme/acme_challenge_selector.rs index 34fd3ee..0b52b49 100644 --- a/src/acme/acme_challenge_selector.rs +++ b/src/acme/acme_challenge_selector.rs @@ -58,6 +58,9 @@ pub struct AcmeChallengeSchemaItem { #[serde(rename = "type")] pub ty: String, pub schema: Value, + /// Human-readable name. + /// The backend sets this to the same value as `id` if no `name` is defined the schema. + pub name: String, } impl ExtractPrimaryKey for AcmeChallengeSchemaItem { @@ -108,6 +111,12 @@ impl Component for ProxmoxAcmeChallengeSelector { .class("pwt-flex-fit"); GridPicker::new(table) + .filter(|plugin: &AcmeChallengeSchemaItem, query: &str| { + let name = plugin.name.to_ascii_uppercase(); + let query = query.to_ascii_uppercase(); + + name.contains(&query) + }) .selection(args.selection.clone()) .on_select(args.controller.on_select_callback()) .into() -- 2.47.3