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 406821FF17E for ; Thu, 27 Nov 2025 16:36:30 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 04EB37D8A; Thu, 27 Nov 2025 16:36:51 +0100 (CET) From: Shannon Sterz To: pdm-devel@lists.proxmox.com Date: Thu, 27 Nov 2025 16:36:06 +0100 Message-ID: <20251127153609.440415-5-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251127153609.440415-1-s.sterz@proxmox.com> References: <20251127153609.440415-1-s.sterz@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764257737144 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.086 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 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 datacenter-manager 3/6] ui: main: only render acl context when we are logged in 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" otherwise it will only log errors about not being able to load the current users acls. the request to load the acl tree could also end up in a race with a login attempt. if the context loading with an invalid ticket and a log in request end up running in parallel, a user will be kicked out after logging in if the context is done loading after the login request. Signed-off-by: Shannon Sterz --- ui/src/main.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ui/src/main.rs b/ui/src/main.rs index 985220c..a06f569 100644 --- a/ui/src/main.rs +++ b/ui/src/main.rs @@ -7,6 +7,7 @@ use web_sys::HtmlElement; //use pbs::utils::init_task_descr_table_pbs; //use pbs_api_types::NodeStatus; use yew::prelude::*; +use yew::virtual_dom::VNode; use pwt::prelude::*; use pwt::props::TextRenderFn; @@ -319,7 +320,7 @@ impl Component for DatacenterManagerApp { }); let username = self.login_info.as_ref().map(|info| info.userid.to_owned()); - let body = Column::new() + let mut body: Html = Column::new() .class("pwt-viewport") .with_child( TopNavBar::new(self.running_tasks.clone()) @@ -343,7 +344,12 @@ impl Component for DatacenterManagerApp { }; main_view }) - .with_optional_child(subscription_alert); + .with_optional_child(subscription_alert) + .into(); + + if self.login_info.is_some() && !loading { + body = html! { {body} }; + } let context = self.remote_list.clone(); let search_context = self.search_provider.clone(); @@ -352,11 +358,9 @@ impl Component for DatacenterManagerApp { DesktopApp::new(html! { context={search_context}> {context}> - - context={view_list_context}> - {body} - > - + context={view_list_context}> + {body} + > > > }) -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel