From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager] ui: use TaskListItem from pbs_api_types to replace removed types
Date: Thu, 16 Oct 2025 10:43:09 +0200 [thread overview]
Message-ID: <20251016084309.48435-1-s.sterz@proxmox.com> (raw)
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 <s.sterz@proxmox.com>
---
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
next reply other threads:[~2025-10-16 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 8:43 Shannon Sterz [this message]
2025-10-16 22:48 ` [pdm-devel] applied: " 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=20251016084309.48435-1-s.sterz@proxmox.com \
--to=s.sterz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.