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 33EAB1FF14F for ; Fri, 08 May 2026 17:06:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1837C1C99D; Fri, 8 May 2026 17:06:20 +0200 (CEST) From: Shannon Sterz To: yew-devel@lists.proxmox.com Subject: [PATCH yew-mobile-gui 14/20] cluster/qemu firewall: use rules panel and comment out unused tabs Date: Fri, 8 May 2026 17:05:29 +0200 Message-ID: <20260508150535.420205-15-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260508150535.420205-1-s.sterz@proxmox.com> References: <20260508150535.420205-1-s.sterz@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778252630309 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.033 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 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_2 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_4 0.1 random spam to be learned in bayes 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: RUTVFZAH2BNG4GQGCPUVEXYAYG74GATU X-Message-ID-Hash: RUTVFZAH2BNG4GQGCPUVEXYAYG74GATU X-MailFrom: s.sterz@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: this makes the rules panel actually display the QEMU and cluster firewall rules. it also comments out the place-holder tabs for now as they don't actually offer any real benefit to users yet. add them back once appropriate components have been implemented. Signed-off-by: Shannon Sterz --- src/pages/page_cluster_firewall/mod.rs | 23 +++++++++-------- src/pages/page_qemu_status/firewall_panel.rs | 27 ++++++++++++-------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/pages/page_cluster_firewall/mod.rs b/src/pages/page_cluster_firewall/mod.rs index 6bb8253..f607b22 100644 --- a/src/pages/page_cluster_firewall/mod.rs +++ b/src/pages/page_cluster_firewall/mod.rs @@ -8,7 +8,7 @@ use pwt::prelude::*; use pwt::state::PersistentState; use pwt::widget::{Column, MiniScroll, TabBar, TabBarItem}; -use proxmox_yew_comp::configuration::pve::FirewallOptionsClusterPanel; +use proxmox_yew_comp::configuration::pve::{FirewallOptionsClusterPanel, FirewallRulesPanel}; use pwt::props::StorageLocation; use crate::widgets::TopNavBar; @@ -37,9 +37,9 @@ pub enum ViewState { #[default] Rules, Options, - SecurityGroup, - Alias, - IPSet, + //IPSet, + //Alias, + //SecurityGroup, } pub enum Msg { @@ -69,9 +69,10 @@ impl Component for PvePageClusterFirewall { let (active_tab, content): (_, Html) = match *self.view_state { ViewState::Rules => ( "rules", - html! { -
{ format!("Firewall rules for cluster") }
- }, + FirewallRulesPanel::cluster_firewall() + .mobile(true) + .readonly(true) + .into(), ), ViewState::Options => ( "options", @@ -80,7 +81,7 @@ impl Component for PvePageClusterFirewall { .readonly(true) .into(), ), - ViewState::Alias => ( + /*ViewState::Alias => ( "alias", html! {
{ format!("Firewall alias for cluster") }
@@ -97,7 +98,7 @@ impl Component for PvePageClusterFirewall { html! {
{ format!("Firewall security group for cluster") }
}, - ), + ),*/ }; let tab_bar = TabBar::new() @@ -122,7 +123,7 @@ impl Component for PvePageClusterFirewall { .callback(|_| Msg::SetViewState(ViewState::Options)), ), ) - .with_item( + /*.with_item( TabBarItem::new() .key("alias") .label(tr!("Alias")) @@ -145,7 +146,7 @@ impl Component for PvePageClusterFirewall { ctx.link() .callback(|_| Msg::SetViewState(ViewState::SecurityGroup)), ), - ); + )*/; Column::new() .class("pwt-fit") diff --git a/src/pages/page_qemu_status/firewall_panel.rs b/src/pages/page_qemu_status/firewall_panel.rs index bcc6213..2c420c8 100644 --- a/src/pages/page_qemu_status/firewall_panel.rs +++ b/src/pages/page_qemu_status/firewall_panel.rs @@ -8,7 +8,7 @@ use pwt::props::StorageLocation; use pwt::state::PersistentState; use pwt::widget::{Column, MiniScroll, TabBar, TabBarItem}; -use proxmox_yew_comp::configuration::pve::FirewallOptionsGuestPanel; +use proxmox_yew_comp::configuration::pve::{FirewallOptionsGuestPanel, FirewallRulesPanel}; use proxmox_yew_comp::form::pve::PveGuestType; #[derive(Clone, PartialEq, Properties)] @@ -31,9 +31,9 @@ pub enum ViewState { #[default] Rules, Options, - Alias, - IPSet, - Log, + //Alias, + //IPSet, + //Log, } pub struct PveQemuFirewallPanel { view_state: PersistentState, @@ -72,9 +72,14 @@ impl Component for PveQemuFirewallPanel { let (active_tab, content): (_, Html) = match *self.view_state { ViewState::Rules => ( "rules", - html! { -
{ format!("Firewall rules for VM {}", props.vmid) }
- }, + FirewallRulesPanel::guest_firewall( + PveGuestType::Qemu, + props.node.clone(), + props.vmid, + ) + .mobile(true) + .readonly(true) + .into(), ), ViewState::Options => ( "options", @@ -83,7 +88,7 @@ impl Component for PveQemuFirewallPanel { .readonly(true) .into(), ), - ViewState::Alias => ( + /*ViewState::Alias => ( "alias", html! {
{ format!("Firewall alias for VM {}", props.vmid) }
@@ -100,7 +105,7 @@ impl Component for PveQemuFirewallPanel { html! {
{ format!("Firewall log for VM {}", props.vmid) }
}, - ), + ),*/ }; let tab_bar = TabBar::new() @@ -125,7 +130,7 @@ impl Component for PveQemuFirewallPanel { .callback(|_| Msg::SetViewState(ViewState::Options)), ), ) - .with_item( + /*.with_item( TabBarItem::new() .key("alias") .label(tr!("Alias")) @@ -145,7 +150,7 @@ impl Component for PveQemuFirewallPanel { .label(tr!("Log")) .icon_class("fa fa-list") .on_activate(ctx.link().callback(|_| Msg::SetViewState(ViewState::Log))), - ); + )*/; Column::new() .class(pwt::css::FlexFit) -- 2.47.3