mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-09 06:58:14 +00:00
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 <t.marx@proxmox.com>
This commit is contained in:
parent
9bf01f76c7
commit
f80f1f94d3
8
Utils.js
8
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user