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 1B2711FF17E for ; Thu, 16 Oct 2025 10:43:24 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 32390CE2A; Thu, 16 Oct 2025 10:43:44 +0200 (CEST) From: Shannon Sterz To: pdm-devel@lists.proxmox.com Date: Thu, 16 Oct 2025 10:43:09 +0200 Message-ID: <20251016084309.48435-1-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1760604187828 X-SPAM-LEVEL: Spam detection results: 0 AWL -2.447 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [tasks.rs, main.rs] URIBL_DBL_SPAM 5 Contains a spam URL listed in the Spamhaus DBL blocklist [tasks.rs] Subject: [pdm-devel] [PATCH datacenter-manager] ui: use TaskListItem from pbs_api_types to replace removed types 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" proxmox-yew-comp recently (c555d73c3bbe2f761b5c0aa237852bc65c870d34: cleanup: remove copied types - use types from pbs_api_types instead) removed TaskListItem from the common_api_types module and replaced it with pbs_api_types' TaskListItem. so use that here again too to make the ui build again avoid incompatabilities. Signed-off-by: Shannon Sterz --- this will make the ui build-able again aginst current yew-comp master (c726bddb7b2b999437215b697d025ba76fcfb328: apt package manager: make it compile again). note that pdm_api_types has a basically identical TaskListItem type, but we can't use that here because yew-comp expects the one from pbs_api_types. ui/src/dashboard/filtered_tasks.rs | 5 +++-- ui/src/main.rs | 2 +- ui/src/remotes/tasks.rs | 6 +++--- ui/src/top_nav_bar.rs | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ui/src/dashboard/filtered_tasks.rs b/ui/src/dashboard/filtered_tasks.rs index b939ccd..5be3bc8 100644 --- a/ui/src/dashboard/filtered_tasks.rs +++ b/ui/src/dashboard/filtered_tasks.rs @@ -2,7 +2,7 @@ use std::rc::Rc; use anyhow::Error; use proxmox_yew_comp::{ - common_api_types::{TaskListItem, TaskStatusClass}, + common_api_types::TaskStatusClass, http_get, utils::{format_duration_human, render_epoch}, Status, TaskViewer, @@ -25,6 +25,7 @@ use pwt::{ }; use pwt::{state::Store, tr, widget::Dialog}; +use pbs_api_types::TaskListItem; use pdm_api_types::{RemoteUpid, TaskFilters, TaskStateType}; use crate::tasks::{format_optional_remote_upid, TaskWorkerType}; @@ -131,7 +132,7 @@ impl Component for PdmFilteredTasks { Msg::LoadFinished(res) }); Self { - task_store: Store::new(), + task_store: Store::with_extract_key(|item: &TaskListItem| item.upid.clone().into()), task_info: None, loading: true, last_error: None, diff --git a/ui/src/main.rs b/ui/src/main.rs index 767a3cc..715ecec 100644 --- a/ui/src/main.rs +++ b/ui/src/main.rs @@ -13,8 +13,8 @@ use pwt::props::TextRenderFn; use pwt::state::{Loader, PersistentState}; use pwt::widget::{Column, DesktopApp, Dialog, Mask}; +use pbs_api_types::TaskListItem; use proxmox_login::Authentication; -use proxmox_yew_comp::common_api_types::TaskListItem; use proxmox_yew_comp::utils::init_task_descr_table_base; use proxmox_yew_comp::{ authentication_from_cookie, http_get, register_auth_observer, AuthObserver, LoginPanel, diff --git a/ui/src/remotes/tasks.rs b/ui/src/remotes/tasks.rs index fc7c30a..4853a1c 100644 --- a/ui/src/remotes/tasks.rs +++ b/ui/src/remotes/tasks.rs @@ -7,11 +7,11 @@ use yew::{ AttrValue, Component, Properties, }; +use pbs_api_types::TaskListItem; use pdm_api_types::RemoteUpid; -use proxmox_yew_comp::{ - common_api_types::TaskListItem, utils::render_epoch_short, TaskViewer, Tasks, -}; +use proxmox_yew_comp::{utils::render_epoch_short, TaskViewer, Tasks}; + use pwt::{ css::{FlexFit, JustifyContent}, props::{ContainerBuilder, FieldBuilder, WidgetBuilder}, diff --git a/ui/src/top_nav_bar.rs b/ui/src/top_nav_bar.rs index 9aeeb73..74394a8 100644 --- a/ui/src/top_nav_bar.rs +++ b/ui/src/top_nav_bar.rs @@ -13,7 +13,6 @@ use yew::virtual_dom::{VComp, VNode}; use pwt::state::{Loader, Theme, ThemeObserver}; use pwt::widget::{Button, Container, Row, ThemeModeSelector, Tooltip}; -use proxmox_yew_comp::common_api_types::TaskListItem; use proxmox_yew_comp::utils::set_location_href; use proxmox_yew_comp::RunningTasksButton; use proxmox_yew_comp::{http_get, LanguageDialog, TaskViewer, ThemeDialog}; @@ -21,6 +20,7 @@ use proxmox_yew_comp::{http_get, LanguageDialog, TaskViewer, ThemeDialog}; use pwt_macros::builder; use pdm_api_types::RemoteUpid; +use pbs_api_types::TaskListItem; use crate::tasks::format_optional_remote_upid; use crate::widget::SearchBox; -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel