all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 5/5] ui: pve: tree: add remote tasks panel
Date: Wed, 10 Sep 2025 13:52:54 +0200	[thread overview]
Message-ID: <20250910115259.3530107-7-d.csapak@proxmox.com> (raw)
In-Reply-To: <20250910115259.3530107-1-d.csapak@proxmox.com>

under the now visible 'Remote' root object. In the future we probably
want to add other things in the top level remote anyway so showing it
now can't hurt.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/pve/mod.rs     | 7 +++++--
 ui/src/pve/tree.rs    | 6 +++++-
 ui/src/remotes/mod.rs | 3 ++-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ui/src/pve/mod.rs b/ui/src/pve/mod.rs
index 7313d5e..fcbccc4 100644
--- a/ui/src/pve/mod.rs
+++ b/ui/src/pve/mod.rs
@@ -32,7 +32,7 @@ pub mod utils;
 mod tree;
 use tree::PveTreeNode;
 
-use crate::get_deep_url;
+use crate::{get_deep_url, remotes::RemoteTaskList};
 
 #[derive(Debug, Eq, PartialEq, Properties)]
 pub struct PveRemote {
@@ -171,7 +171,10 @@ impl LoadableComponent for PveRemoteComp {
         let remote = &props.remote;
 
         let content: Html = match &self.view {
-            PveTreeNode::Root => html! {},
+            PveTreeNode::Root => Panel::new()
+                .title(tr!("Remote Tasks"))
+                .with_child(RemoteTaskList::new().remote(remote.clone()))
+                .into(),
             PveTreeNode::Node(node) => {
                 node::NodePanel::new(remote.clone(), node.node.clone()).into()
             }
diff --git a/ui/src/pve/tree.rs b/ui/src/pve/tree.rs
index c669bab..d2d920c 100644
--- a/ui/src/pve/tree.rs
+++ b/ui/src/pve/tree.rs
@@ -256,7 +256,7 @@ impl PveTreeComp {
             }
         }
         self.store.write().update_root_tree(tree);
-        self.store.write().set_view_root(false);
+        self.store.write().set_view_root(true);
         self.loaded = true;
     }
 }
@@ -557,6 +557,10 @@ fn columns(
     remote: String,
     loading: bool,
 ) -> Rc<Vec<DataTableHeader<PveTreeNode>>> {
+    let loading = match store.read().root() {
+        Some(root) => loading && root.children_count() == 0,
+        None => loading,
+    };
     Rc::new(vec![
         DataTableColumn::new("Type/ID")
             .flex(1)
diff --git a/ui/src/remotes/mod.rs b/ui/src/remotes/mod.rs
index 88e6c46..83b3331 100644
--- a/ui/src/remotes/mod.rs
+++ b/ui/src/remotes/mod.rs
@@ -22,6 +22,7 @@ mod config;
 pub use config::{create_remote, RemoteConfigPanel};
 
 mod tasks;
+pub use tasks::RemoteTaskList;
 
 use yew::{function_component, Html};
 
@@ -51,7 +52,7 @@ pub fn system_configuration() -> Html {
                 .key("tasks")
                 .label(tr!("Tasks"))
                 .icon_class("fa fa-book"),
-            |_| tasks::RemoteTaskList::new().into(),
+            |_| RemoteTaskList::new().into(),
         );
 
     NavigationContainer::new().with_child(panel).into()
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


  parent reply	other threads:[~2025-09-10 11:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10 11:52 [pdm-devel] [PATCH datacenter-manager/yew-comp 0/6] ui: add remote task panel and filtering Dominik Csapak
2025-09-10 11:52 ` [pdm-devel] [PATCH yew-comp 1/1] tasks: add optional fixed filter Dominik Csapak
2025-09-10 12:23   ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-10 11:52 ` [pdm-devel] [PATCH datacenter-manager 1/5] ui: adapt to new node_ref semantic for new pwt Dominik Csapak
2025-09-10 13:50   ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-10 11:52 ` [pdm-devel] [PATCH datacenter-manager 2/5] ui: remote: tasks: add remote filter Dominik Csapak
2025-09-10 13:50   ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-10 11:52 ` [pdm-devel] [PATCH datacenter-manager 3/5] ui: remote: tasks: add optional remote property to filter Dominik Csapak
2025-09-10 13:50   ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-10 11:52 ` [pdm-devel] [PATCH datacenter-manager 4/5] ui: pve: tree: use correct key for the root node Dominik Csapak
2025-09-10 13:50   ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-10 11:52 ` Dominik Csapak [this message]
2025-09-10 13:50   ` [pdm-devel] applied: [PATCH datacenter-manager 5/5] ui: pve: tree: add remote tasks panel 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=20250910115259.3530107-7-d.csapak@proxmox.com \
    --to=d.csapak@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal