From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager v3 4/4] ui: remote task view: set refresh_task_url property for task viewer
Date: Mon, 29 Dec 2025 16:30:04 +0100 [thread overview]
Message-ID: <20251229153004.377533-7-l.wagner@proxmox.com> (raw)
In-Reply-To: <20251229153004.377533-1-l.wagner@proxmox.com>
This new property of `Tasks` is a URL that is POSTed when the 'refresh'
button is clicked. The URL we provide in this instance is the one used
to trigger manual task fetching from our remotes.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
---
ui/src/remotes/tasks.rs | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/ui/src/remotes/tasks.rs b/ui/src/remotes/tasks.rs
index f42fa0f4..0ab2584f 100644
--- a/ui/src/remotes/tasks.rs
+++ b/ui/src/remotes/tasks.rs
@@ -10,7 +10,9 @@ use yew::{
use pbs_api_types::TaskListItem;
use pdm_api_types::RemoteUpid;
-use proxmox_yew_comp::{utils::render_epoch_short, TaskViewer, Tasks};
+use proxmox_yew_comp::{
+ percent_encoding::percent_encode_component, utils::render_epoch_short, TaskViewer, Tasks,
+};
use pwt::{
css::{FlexFit, JustifyContent},
@@ -138,8 +140,18 @@ impl Component for PbsRemoteTaskList {
})
});
+ let refresh_task_url = if let Some(remote) = &props.remote {
+ format!(
+ "/remotes/tasks/refresh?remotes={}",
+ percent_encode_component(remote)
+ )
+ } else {
+ "/remotes/tasks/refresh".into()
+ };
+
let mut task_list = Tasks::new()
.base_url("/remotes/tasks/list")
+ .refresh_task_url(refresh_task_url)
.on_show_task({
let link = ctx.link().clone();
move |(upid_str, endtime)| link.send_message(Some((upid_str, endtime)))
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
prev parent reply other threads:[~2025-12-29 15:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 15:29 [pdm-devel] [PATCH datacenter-manager/proxmox-yew-comp v3 0/6] manual refresh button for remote task cache Lukas Wagner
2025-12-29 15:29 ` [pdm-devel] [PATCH proxmox-yew-comp v3 1/2] task list: add support for starting refresh tasks Lukas Wagner
2025-12-29 15:30 ` [pdm-devel] [PATCH proxmox-yew-comp v3 2/2] loadable component: don't trigger reload when starting a task Lukas Wagner
2025-12-29 15:30 ` [pdm-devel] [PATCH datacenter-manager v3 1/4] remote tasks: move implementation to server crate Lukas Wagner
2025-12-29 15:30 ` [pdm-devel] [PATCH datacenter-manager v3 2/4] remote tasks: implement `refresh_task_cache` for manual task fetching Lukas Wagner
2025-12-29 15:30 ` [pdm-devel] [PATCH datacenter-manager v3 3/4] api: add /remotes/tasks/refresh Lukas Wagner
2025-12-29 15:30 ` Lukas Wagner [this message]
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=20251229153004.377533-7-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 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.