From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 30BD61FF187 for ; Tue, 2 Dec 2025 15:32:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8227C14A19; Tue, 2 Dec 2025 15:33:09 +0100 (CET) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Date: Tue, 2 Dec 2025 15:31:08 +0100 Message-ID: <20251202143226.3681712-8-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251202143226.3681712-1-d.csapak@proxmox.com> References: <20251202143226.3681712-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 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 5/5] ui: views: make Subscription panel not required anymore 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" Since we now show the subscription state of pdm always in the top bar, the subscription panel in views are useful, but not required anymore. Signed-off-by: Dominik Csapak --- ui/src/dashboard/view.rs | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/ui/src/dashboard/view.rs b/ui/src/dashboard/view.rs index 0606f1a9..f45f4622 100644 --- a/ui/src/dashboard/view.rs +++ b/ui/src/dashboard/view.rs @@ -12,7 +12,7 @@ use pwt::css; use pwt::prelude::*; use pwt::props::StorageLocation; use pwt::state::{PersistentState, SharedState}; -use pwt::widget::{error_message, form::FormContext, Column, Container, Progress, Row}; +use pwt::widget::{error_message, form::FormContext, Column, Container, Progress}; use pwt::AsyncPool; use crate::dashboard::refresh_config_edit::{ @@ -288,23 +288,6 @@ fn required_api_calls(layout: &ViewLayout) -> (bool, bool, bool) { (status, top_entities, task_statistics) } -fn has_sub_panel(layout: Option<&ViewTemplate>) -> bool { - match layout.map(|template| &template.layout) { - Some(ViewLayout::Rows { rows }) => { - for row in rows { - for item in row { - if item.r#type == WidgetType::Subscription { - return true; - } - } - } - } - None => {} - } - - false -} - impl Component for ViewComp { type Message = Msg; type Properties = View; @@ -479,25 +462,6 @@ impl Component for ViewComp { ), ); - if !has_sub_panel(self.template.data.as_ref()) { - let subs = self.render_args.subscriptions.clone(); - let link = ctx.link().clone(); - view.add_child( - Row::new() - .padding_x(4) - .padding_bottom(4) - .padding_top(0) - .class("pwt-content-spacer-colors") - .with_child( - create_subscription_panel( - subs.clone(), - link.clone() - .callback(move |_| Msg::ShowSubscriptionsDialog(true)), - ) - .flex(1.0), - ), - ); - } match self.template.data.as_ref().map(|template| &template.layout) { Some(ViewLayout::Rows { rows }) => { view.add_child( -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel