[pve-devel] [PATCH v5 widget 1/1] widget: added new parameter to pass a command to the newly opened terminal

Tim Marx t.marx at proxmox.com
Fri Feb 8 12:16:58 CET 2019


Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
 Utils.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Utils.js b/Utils.js
index db55996..1b6dc5f 100644
--- a/Utils.js
+++ b/Utils.js
@@ -577,13 +577,15 @@ Ext.define('Proxmox.Utils', { utilities: {
 	return Ext.Date.format(servertime, 'Y-m-d H:i:s');
     },
 
-    openXtermJsViewer: function(vmtype, vmid, nodename, vmname) {
-	var url = Ext.urlEncode({
+    openXtermJsViewer: function(vmtype, vmid, nodename, vmname, cmd) {
+	var url = Ext.Object.toQueryString({
 	    console: vmtype, // kvm, lxc, upgrade or shell
 	    xtermjs: 1,
 	    vmid: vmid,
 	    vmname: vmname,
-	    node: nodename
+	    node: nodename,
+	    cmd: cmd,
+
 	});
 	var nw = window.open("?" + url, '_blank', 'toolbar=no,location=no,status=no,menubar=no,resizable=yes,width=800,height=420');
 	nw.focus();
-- 
2.11.0



More information about the pve-devel mailing list