From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C5D391FF1A6 for ; Fri, 5 Dec 2025 16:26:04 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id F30D55322; Fri, 5 Dec 2025 16:26:32 +0100 (CET) From: Hannes Laimer To: pdm-devel@lists.proxmox.com Date: Fri, 5 Dec 2025 16:25:42 +0100 Message-ID: <20251205152543.91431-8-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251205152543.91431-1-h.laimer@proxmox.com> References: <20251205152543.91431-1-h.laimer@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764948312658 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.247 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy ENA_SUBJ_ODD_CASE 2.6 Subject has odd case KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH proxmox-yew-comp 1/2] firewall: rules: rename ListFirewallRules to FirewallRule X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Adjust to rename in pve-api-types. Signed-off-by: Hannes Laimer --- src/firewall/rules.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/firewall/rules.rs b/src/firewall/rules.rs index 0958fc0..c40fab7 100644 --- a/src/firewall/rules.rs +++ b/src/firewall/rules.rs @@ -82,10 +82,10 @@ pub enum FirewallMsg { #[doc(hidden)] pub struct ProxmoxFirewallRules { - store: Store, - loader: Loader>, - _listener: SharedStateObserver>>, - columns: Rc>>, + store: Store, + loader: Loader>, + _listener: SharedStateObserver>>, + columns: Rc>>, } fn pill(text: impl Into) -> Container { @@ -99,7 +99,7 @@ fn pill(text: impl Into) -> Container { .with_child(text.into()) } -fn format_firewall_rule(rule: &pve_api_types::ListFirewallRules) -> Html { +fn format_firewall_rule(rule: &pve_api_types::FirewallRule) -> Html { let mut parts: Vec = Vec::new(); if let Some(iface) = &rule.iface { @@ -155,21 +155,21 @@ impl ProxmoxFirewallRules { } } - fn build_columns() -> Rc>> { + fn build_columns() -> Rc>> { Rc::new(vec![ DataTableColumn::new("") .width("30px") .justify("right") .show_menu(false) .resizable(false) - .render(|rule: &pve_api_types::ListFirewallRules| html! {&rule.pos}) + .render(|rule: &pve_api_types::FirewallRule| html! {&rule.pos}) .into(), DataTableColumn::new(tr!("On")) .width("40px") .justify("center") .resizable(false) .render( - |rule: &pve_api_types::ListFirewallRules| match rule.enable { + |rule: &pve_api_types::FirewallRule| match rule.enable { Some(1) => Fa::new("check").into(), Some(0) | None => Fa::new("minus").into(), _ => "-".into(), @@ -178,19 +178,19 @@ impl ProxmoxFirewallRules { .into(), DataTableColumn::new(tr!("Type")) .width("80px") - .render(|rule: &pve_api_types::ListFirewallRules| html! {&rule.ty}) + .render(|rule: &pve_api_types::FirewallRule| html! {&rule.ty}) .into(), DataTableColumn::new(tr!("Action")) .width("100px") - .render(|rule: &pve_api_types::ListFirewallRules| html! {&rule.action}) + .render(|rule: &pve_api_types::FirewallRule| html! {&rule.action}) .into(), DataTableColumn::new(tr!("Rule")) .flex(1) - .render(|rule: &pve_api_types::ListFirewallRules| format_firewall_rule(rule)) + .render(|rule: &pve_api_types::FirewallRule| format_firewall_rule(rule)) .into(), DataTableColumn::new(tr!("Comment")) .width("150px") - .render(|rule: &pve_api_types::ListFirewallRules| { + .render(|rule: &pve_api_types::FirewallRule| { rule.comment.as_deref().unwrap_or("-").into() }) .into(), @@ -207,7 +207,7 @@ impl Component for ProxmoxFirewallRules { let url: AttrValue = props.context.rules_url().into(); - let store = Store::with_extract_key(|item: &pve_api_types::ListFirewallRules| { + let store = Store::with_extract_key(|item: &pve_api_types::FirewallRule| { Key::from(item.pos.to_string()) }); -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel