From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 5/5] ui: register task descriptions for some native PDM tasks
Date: Tue, 16 Dec 2025 14:15:18 +0100 [thread overview]
Message-ID: <20251216131518.241022-7-l.wagner@proxmox.com> (raw)
In-Reply-To: <20251216131518.241022-1-l.wagner@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
ui/src/lib.rs | 2 +-
ui/src/main.rs | 7 ++++---
ui/src/tasks.rs | 19 ++++++++++++++++++-
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/ui/src/lib.rs b/ui/src/lib.rs
index 1aac7571..674cb27b 100644
--- a/ui/src/lib.rs
+++ b/ui/src/lib.rs
@@ -54,7 +54,7 @@ mod load_result;
pub use load_result::LoadResult;
mod tasks;
-pub use tasks::register_pve_tasks;
+pub use tasks::register_tasks;
mod view_list_context;
pub use view_list_context::ViewListContext;
diff --git a/ui/src/main.rs b/ui/src/main.rs
index 5f859dbc..56ae7429 100644
--- a/ui/src/main.rs
+++ b/ui/src/main.rs
@@ -23,8 +23,8 @@ use proxmox_yew_comp::{
//use pbs::MainMenu;
use pdm_api_types::views::ViewConfig;
use pdm_ui::{
- check_pdm_subscription, pdm_subscription_alert, register_pve_tasks, MainMenu, RemoteList,
- RemoteListCacheEntry, SearchProvider, TopNavBar, ViewListContext,
+ check_pdm_subscription, pdm_subscription_alert, MainMenu, RemoteList, RemoteListCacheEntry,
+ SearchProvider, TopNavBar, ViewListContext,
};
type MsgRemoteList = Result<RemoteList, Error>;
@@ -380,7 +380,8 @@ fn main() {
yew::set_custom_panic_hook(panic_hook());
init_task_descr_table_base();
- register_pve_tasks();
+ pdm_ui::register_tasks();
+
proxmox_yew_comp::http_setup(&proxmox_yew_comp::ExistingProduct::PDM);
pwt::props::set_http_get_method(
diff --git a/ui/src/tasks.rs b/ui/src/tasks.rs
index 0f9a9aa7..7e40863d 100644
--- a/ui/src/tasks.rs
+++ b/ui/src/tasks.rs
@@ -4,7 +4,12 @@ use pwt::tr;
use pdm_api_types::{NativeUpid, RemoteUpid};
use yew::virtual_dom::Key;
-pub fn register_pve_tasks() {
+pub fn register_tasks() {
+ register_pve_tasks();
+ register_pdm_tasks();
+}
+
+fn register_pve_tasks() {
register_task_description("qmstart", ("VM", tr!("Start")));
register_task_description("acmedeactivate", ("ACME Account", tr!("Deactivate")));
register_task_description("acmenewcert", ("SRV", tr!("Order Certificate")));
@@ -107,6 +112,18 @@ pub fn register_pve_tasks() {
register_task_description("zfsremove", ("ZFS Pool", tr!("Remove")));
}
+fn register_pdm_tasks() {
+ register_task_description("logrotate", tr!("Log Rotation"));
+ register_task_description(
+ "refresh-remote-tasks",
+ tr!("Fetch latest tasks from remotes"),
+ );
+ register_task_description(
+ "refresh-remote-updates",
+ tr!("Fetch system update list from remotes"),
+ );
+}
+
/// Format a UPID that is either [`RemoteUpid`] or a [`UPID`]
/// If it's a [`RemoteUpid`], prefixes it with the remote name
pub fn format_optional_remote_upid(upid: &str, include_remote: bool) -> String {
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-12-16 13:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 13:15 [pdm-devel] [PATCH-SERIES 0/6] manual refresh button for remote task cache Lukas Wagner
2025-12-16 13:15 ` [pdm-devel] [PATCH proxmox-yew-comp 1/1] task list: add support for starting refresh tasks Lukas Wagner
2025-12-16 13:15 ` [pdm-devel] [PATCH datacenter-manager 1/5] remote tasks: move implementation to server crate Lukas Wagner
2025-12-16 13:15 ` [pdm-devel] [PATCH datacenter-manager 2/5] remote tasks: implement `refresh_task_cache` for manual task fetching Lukas Wagner
2025-12-16 13:15 ` [pdm-devel] [PATCH datacenter-manager 3/5] api: add /remotes/tasks/refresh Lukas Wagner
2025-12-16 13:15 ` [pdm-devel] [PATCH datacenter-manager 4/5] ui: remote task view: set refresh_task_url property for task viewer Lukas Wagner
2025-12-16 13:15 ` Lukas Wagner [this message]
2025-12-17 14:37 ` [pdm-devel] [PATCH-SERIES 0/6] manual refresh button for remote task cache Lukas Wagner
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=20251216131518.241022-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox