From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 349921FF17C for ; Tue, 16 Dec 2025 14:15:15 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1C66CF7EE; Tue, 16 Dec 2025 14:16:01 +0100 (CET) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Date: Tue, 16 Dec 2025 14:15:18 +0100 Message-ID: <20251216131518.241022-7-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251216131518.241022-1-l.wagner@proxmox.com> References: <20251216131518.241022-1-l.wagner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1765890918142 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.017 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_SBL_A 0.1 Contains URL's A record listed in the Spamhaus SBL blocklist [188.114.96.3] Subject: [pdm-devel] [PATCH datacenter-manager 5/5] ui: register task descriptions for some native PDM tasks X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Signed-off-by: Lukas Wagner --- 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; @@ -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