* [pdm-devel] [PATCH datacenter-manager] ui: use TaskListItem from pbs_api_types to replace removed types
@ 2025-10-16 8:43 Shannon Sterz
2025-10-16 22:48 ` [pdm-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Shannon Sterz @ 2025-10-16 8:43 UTC (permalink / raw)
To: 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 <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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pdm-devel] applied: [PATCH datacenter-manager] ui: use TaskListItem from pbs_api_types to replace removed types
2025-10-16 8:43 [pdm-devel] [PATCH datacenter-manager] ui: use TaskListItem from pbs_api_types to replace removed types Shannon Sterz
@ 2025-10-16 22:48 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-10-16 22:48 UTC (permalink / raw)
To: pdm-devel, Shannon Sterz
On Thu, 16 Oct 2025 10:43:09 +0200, Shannon Sterz wrote:
> 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.
>
>
> [...]
Applied and also bumped proxmox-yew-comp and raised the required dependency
version for PDM, thanks!
[1/1] ui: use TaskListItem from pbs_api_types to replace removed types
commit: 97077a8f826daef52fbd937bdf5eef5e554d894d
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-16 22:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-16 8:43 [pdm-devel] [PATCH datacenter-manager] ui: use TaskListItem from pbs_api_types to replace removed types Shannon Sterz
2025-10-16 22:48 ` [pdm-devel] applied: " Thomas Lamprecht
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.