From b90b2ac0bf5ea45ca145e663f4b449d6c47e095c Mon Sep 17 00:00:00 2001 From: si458 Date: Thu, 26 Sep 2024 19:51:06 +0100 Subject: [PATCH] add RDP to device context menu #6401 Signed-off-by: si458 --- translate/translate.json | 3 ++- views/default.handlebars | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/translate/translate.json b/translate/translate.json index 455cd7e5..7c01c96c 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -61827,7 +61827,8 @@ "default.handlebars->47->1042", "default.handlebars->47->439", "default.handlebars->47->998", - "default.handlebars->container->dialog->dialogBody->dialog7->1->td7rdpkvm" + "default.handlebars->container->dialog->dialogBody->dialog7->1->td7rdpkvm", + "default.handlebars->contextMenu->cxrdp" ] }, { diff --git a/views/default.handlebars b/views/default.handlebars index 02ec6fcd..95fc2f77 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -64,6 +64,7 @@
Web-RDP
Web-VNC
Web-SSH
+
RDP

@@ -6448,7 +6449,16 @@ QV('cxwebrdp', ((((node.conn & 1) != 0) || (node.mtype == 3)) && (node.agent) && ((rights & 8) != 0) && ((features & 0x40000000) == 0))); QV('cxwebssh', ((features2 & 0x200) && (((node.conn & 1) != 0) || (node.mtype == 3)) && (node.agent) && ((rights & 8) != 0))); QV('cxconsole', (consoleRights && (node.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 8) != 0))) && (rights & 8)); - + QV('cxrdp', false); // always have the RDP hidden + if ((((node.conn & 1) != 0) || (node.mtype == 3)) && (node.agent) && ((rights & 8) != 0)) { + if ((node.agent.id > 0) && (node.agent.id < 5)) { + if (navigator.platform.toLowerCase() == 'win32') { + if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.rdp != false)) { + QV('cxrdp', true); + } + } + } + } QV('cxmgroupsplit', true); QV('cxstar', true); break; @@ -6516,6 +6526,7 @@ else if (action == 11) { p10mstsc(nodeid); } // Web-RDP else if (action == 12) { p10rfb(nodeid); } // Web-VNC else if (action == 13) { p10ssh(nodeid); } // Web-SSH + else if (action == 14) { p10MCRouter(nodeid,3); } // RDP } function cmmeshaction(action) {