From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager] ui: task list: look up task description for PBS tasks
Date: Tue, 2 Dec 2025 17:39:59 +0100 [thread overview]
Message-ID: <20251202163959.434098-1-l.wagner@proxmox.com> (raw)
Before this commit, PBS tasks would have their full UPID in the
'Description' column, which looks a bit odd.
The actual task description definitions are still missing, these can be
added later. Up until then, the description will now look like e.g.
'create-datastore xyz', which is definitely better than the plain UPID.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
ui/src/tasks.rs | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/ui/src/tasks.rs b/ui/src/tasks.rs
index 41a8648d..0f9a9aa7 100644
--- a/ui/src/tasks.rs
+++ b/ui/src/tasks.rs
@@ -1,8 +1,7 @@
use proxmox_yew_comp::utils::{format_task_description, format_upid, register_task_description};
use pwt::tr;
-use pdm_api_types::RemoteUpid;
-use pdm_client::types::PveUpid;
+use pdm_api_types::{NativeUpid, RemoteUpid};
use yew::virtual_dom::Key;
pub fn register_pve_tasks() {
@@ -112,10 +111,16 @@ pub fn register_pve_tasks() {
/// If it's a [`RemoteUpid`], prefixes it with the remote name
pub fn format_optional_remote_upid(upid: &str, include_remote: bool) -> String {
if let Ok(remote_upid) = upid.parse::<RemoteUpid>() {
- let description = match remote_upid.upid().parse::<PveUpid>() {
- Ok(upid) => format_task_description(&upid.worker_type, upid.worker_id.as_deref()),
+ let description = match remote_upid.native_upid() {
+ Ok(NativeUpid::PveUpid(upid)) => {
+ format_task_description(&upid.worker_type, upid.worker_id.as_deref())
+ }
+ Ok(NativeUpid::PbsUpid(upid)) => {
+ format_task_description(&upid.worker_type, upid.worker_id.as_deref())
+ }
Err(_) => format_upid(&remote_upid.upid()),
};
+
if include_remote {
format!("{} - {}", remote_upid.remote(), description)
} else {
--
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-12-02 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 16:39 Lukas Wagner [this message]
2025-12-02 18:49 ` [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=20251202163959.434098-1-l.wagner@proxmox.com \
--to=l.wagner@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