From: Tim Marx Date: Wed, 27 Feb 2019 14:01:17 +0000 (+0100) Subject: utils: xtermjs: allow to pass a 'cmd' parameter to the terminal X-Git-Url: https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff_plain;h=f80f1f94d338b5a8904e6aa6b9f9f0035e7e81b1 utils: xtermjs: allow to pass a 'cmd' parameter to the terminal also, as we already touch this: Ext.urlEncode is deprecated, use Ext.Object.toQueryString instead Signed-off-by: Tim Marx --- diff --git a/Utils.js b/Utils.js index dac5fb1..ef4aa5e 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'); if (nw) {