mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-24 00:52:27 +00:00
add Xtermjs popup helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
e94c076748
commit
881c9c0c12
14
Utils.js
14
Utils.js
@ -476,9 +476,21 @@ Ext.define('Proxmox.Utils', { utilities: {
|
|||||||
render_timestamp: function(value, metaData, record, rowIndex, colIndex, store) {
|
render_timestamp: function(value, metaData, record, rowIndex, colIndex, store) {
|
||||||
var servertime = new Date(value * 1000);
|
var servertime = new Date(value * 1000);
|
||||||
return Ext.Date.format(servertime, 'Y-m-d H:i:s');
|
return Ext.Date.format(servertime, 'Y-m-d H:i:s');
|
||||||
|
},
|
||||||
|
|
||||||
|
openXtermJsViewer: function(vmtype, vmid, nodename, vmname) {
|
||||||
|
var url = Ext.urlEncode({
|
||||||
|
console: vmtype, // kvm, lxc, upgrade or shell
|
||||||
|
xtermjs: 1,
|
||||||
|
vmid: vmid,
|
||||||
|
vmname: vmname,
|
||||||
|
node: nodename
|
||||||
|
});
|
||||||
|
var nw = window.open("?" + url, '_blank', 'toolbar=no,location=no,status=no,menubar=no,resizable=yes,width=800,height=420');
|
||||||
|
nw.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
singleton: true,
|
singleton: true,
|
||||||
constructor: function() {
|
constructor: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user