From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 3/3] ui: views: make Subscription panel not required anymore
Date: Wed, 3 Dec 2025 10:59:39 +0100 [thread overview]
Message-ID: <20251203095945.1459122-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20251203095945.1459122-1-d.csapak@proxmox.com>
Since we now show the subscription state of pdm always in the status row,
the subscription panel in views are useful, but not required anymore.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
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
next prev parent reply other threads:[~2025-12-03 9:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 9:59 [pdm-devel] [PATCH datacenter-manager 1/3] ui: mark subscription check as active if no remotes are configured Dominik Csapak
2025-12-03 9:59 ` [pdm-devel] [PATCH datacenter-manager 2/3] ui: dashboard/views: add subscription notice in status row Dominik Csapak
2025-12-03 9:59 ` Dominik Csapak [this message]
2025-12-03 12:08 ` [pdm-devel] [PATCH datacenter-manager 1/3] ui: mark subscription check as active if no remotes are configured Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251203095945.1459122-3-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox