* [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to node rows
@ 2026-11-30 13:43 Dominik Csapak
2026-11-30 13:43 ` [PATCH datacenter-manager 2/2] docs: web ui: describe the 'Open Shell' action of " Dominik Csapak
2026-11-30 20:15 ` applied: [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-11-30 13:43 UTC (permalink / raw)
To: pdm-devel
so users can open the shell of a node in its own browser window, like
the console of a guest, instead of only in the 'Shell' tab of the node
panel.
The action is only shown if the user has 'Sys.Console' on the node and
the pve-manager version of the node is new enough, like for the 'Shell'
tab. It is always enabled then. If the shell cannot be opened, e.g.
because the node is offline, the shell window itself shows the reason.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/src/pve/tree.rs | 38 ++++++++++++++++++++++++++++++++++++--
ui/src/pve/utils.rs | 6 ++++++
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/ui/src/pve/tree.rs b/ui/src/pve/tree.rs
index 3c0b533d..2c3ffac3 100644
--- a/ui/src/pve/tree.rs
+++ b/ui/src/pve/tree.rs
@@ -28,7 +28,7 @@ use pwt::widget::{
use pwt::{prelude::*, widget::Button};
use pdm_api_types::{
- RemoteUpid,
+ PRIV_SYS_CONSOLE, RemoteUpid,
resource::{AsResourceView, PveNodeResource, PveResource, Resource},
};
use pdm_search::SearchTerm;
@@ -43,7 +43,10 @@ use crate::{
widget::{BulkActionWindow, MigrateWindow, bulk_action_disabled_reason},
};
-use super::{ConfirmGuestAction, GuestInfo, GuestRowActions, PowerAction, PowerActionExt, utils};
+use super::{
+ ConfirmGuestAction, GuestInfo, GuestRowActions, PowerAction, PowerActionExt, action_tooltip,
+ utils,
+};
#[derive(Clone, PartialEq)]
pub enum PveTreeNode {
@@ -856,9 +859,19 @@ fn columns(
.on_activate(open_pve_ui(&link, &remote, node, local_id)),
)
.tip(tr!("Open in PVE UI"));
+ let open_shell = match entry {
+ // a placeholder for a node that the remote did not list has no name
+ PveTreeNode::Resource(PveResource::Node(node)) if !node.node.is_empty() => {
+ let version = pve_manager_versions.get(&node.node);
+ open_shell_action(&acl, &remote, &node.node, version)
+ }
+ _ => None,
+ };
Row::new()
.class(JustifyContent::FlexEnd)
+ // in front, so that the other icons stay in line with those of the other rows
+ .with_optional_child(open_shell)
.with_child(open_pve_ui)
.with_optional_child(match entry {
PveTreeNode::Root if !querying => {
@@ -907,6 +920,27 @@ fn columns(
])
}
+/// The row action that opens a shell on `node` in its own window, if the user has `Sys.Console`
+/// and the pve-manager version of the node is new enough.
+fn open_shell_action(
+ acl: &AclContext,
+ remote: &str,
+ node: &str,
+ pve_manager_version: Option<&Version>,
+) -> Option<Tooltip> {
+ let may_open = acl.check_privs(&["resource", remote, "node", node], PRIV_SYS_CONSOLE);
+ let blocked = utils::console_unavailable_reason(may_open, pve_manager_version, node);
+ blocked.is_none().then(|| {
+ let (remote, node) = (remote.to_string(), node.to_string());
+ action_tooltip(
+ ActionIcon::new("fa fa-terminal")
+ .on_activate(move |_| utils::open_node_shell(&remote, &node)),
+ tr!("Open Shell"),
+ None,
+ )
+ })
+}
+
/// A callback that opens the resource in the web interface of the remote, in a new tab. It also
/// closes the menu of a right click on a guest, which the other actions replace with a dialog.
fn open_pve_ui<IN>(
diff --git a/ui/src/pve/utils.rs b/ui/src/pve/utils.rs
index 91cc03b0..17d9b34c 100644
--- a/ui/src/pve/utils.rs
+++ b/ui/src/pve/utils.rs
@@ -328,6 +328,12 @@ pub(crate) fn open_guest_console(remote: &str, node: &str, guest: GuestInfo, nov
XTermJs::open_xterm_js_viewer(console_type, node, use_vnc);
}
+/// Opens a login shell on `node` of `remote` in its own browser window.
+pub(crate) fn open_node_shell(remote: &str, node: &str) {
+ let console_type = ConsoleType::RemotePveLoginShell(remote.to_string());
+ XTermJs::open_xterm_js_viewer(console_type, node, false);
+}
+
/// Returns `console`, or why it cannot be shown if the user lacks `Sys.Console` or `node` runs a
/// version of Proxmox VE that is too old for it. An unknown version counts as new enough.
pub(crate) fn render_console(
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH datacenter-manager 2/2] docs: web ui: describe the 'Open Shell' action of node rows
2026-11-30 13:43 [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to node rows Dominik Csapak
@ 2026-11-30 13:43 ` Dominik Csapak
2026-11-30 20:15 ` applied: [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-11-30 13:43 UTC (permalink / raw)
To: pdm-devel
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
docs/web-ui.rst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docs/web-ui.rst b/docs/web-ui.rst
index 1812a11b..56e537a7 100644
--- a/docs/web-ui.rst
+++ b/docs/web-ui.rst
@@ -256,7 +256,9 @@ in that scope (disabled on offline nodes; see :ref:`guests`).
For nodes, the detail tabs cover metrics (**Overview**), editable **Notes**, **Tasks**, **Updates**,
**Update History**, and a **Shell** tab. The **Shell** tab opens the node's shell and requires
-``Sys.Console`` on ``/resource/{remote}/node/{node}`` and Proxmox VE 9.1 or newer on the node.
+``Sys.Console`` on ``/resource/{remote}/node/{node}`` and Proxmox VE 9.1 or newer on the node. With
+the same requirements, **Open Shell** on the node rows of the tree opens the shell in its own
+browser window, which stays open when navigating away.
Editing node notes requires ``Resource.Modify`` on ``/resource/{remote}/node/{node}`` and is also
available via ``proxmox-datacenter-manager-client pve node config`` and ``pve node set``. The
**Tasks** tab lists the tasks that ran on the node. The header of a node panel offers buttons to
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* applied: [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to node rows
2026-11-30 13:43 [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to node rows Dominik Csapak
2026-11-30 13:43 ` [PATCH datacenter-manager 2/2] docs: web ui: describe the 'Open Shell' action of " Dominik Csapak
@ 2026-11-30 20:15 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-11-30 20:15 UTC (permalink / raw)
To: pdm-devel, Dominik Csapak
On Mon, 30 Nov 2026 14:43:02 +0100, Dominik Csapak wrote:
> so users can open the shell of a node in its own browser window, like
> the console of a guest, instead of only in the 'Shell' tab of the node
> panel.
>
> The action is only shown if the user has 'Sys.Console' on the node and
> the pve-manager version of the node is new enough, like for the 'Shell'
> tab. It is always enabled then. If the shell cannot be opened, e.g.
> because the node is offline, the shell window itself shows the reason.
>
> [...]
Applied, thanks!
[1/2] ui: pve: tree: add 'Open Shell' action to node rows
commit: 4dba63ece6f9402fb11871411465a49b260ff91a
[2/2] docs: web ui: describe the 'Open Shell' action of node rows
commit: 8bf8ec30cf3d85d2f249bfb8889fcb8a161ffe7b
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-30 20:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:43 [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to node rows Dominik Csapak
2026-11-30 13:43 ` [PATCH datacenter-manager 2/2] docs: web ui: describe the 'Open Shell' action of " Dominik Csapak
2026-11-30 20:15 ` applied: [PATCH datacenter-manager 1/2] ui: pve: tree: add 'Open Shell' action to " Thomas Lamprecht
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.