]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/VNCConsole.js
1 Ext
.define('PVE.noVncConsole', {
2 extend
: 'Ext.panel.Panel',
3 alias
: 'widget.pveNoVncConsole',
9 consoleType
: undefined, // lxc, kvm, shell, cmd
15 initComponent: function() {
19 throw "no node name specified";
22 if (!me
.consoleType
) {
23 throw "no console type specified";
26 if (!me
.vmid
&& me
.consoleType
!== 'shell' && me
.consoleType
!== 'cmd') {
27 throw "no VM ID specified";
30 // always use same iframe, to avoid running several noVnc clients
31 // at same time (to avoid performance problems)
32 var box
= Ext
.create('Ext.ux.IFrame', { itemid
: "vncconsole" });
34 var type
= me
.xtermjs
? 'xtermjs' : 'novnc';
38 activate: function() {
39 var sp
= Ext
.state
.Manager
.getProvider();
41 console
: me
.consoleType
, // kvm, lxc, upgrade or shell
45 resize
: sp
.get('novnc-scaling', 'scale'),
48 PVE
.Utils
.cleanEmptyObjectKeys(queryDict
);
49 var url
= '/?' + Ext
.Object
.toQueryString(queryDict
);
57 me
.on('afterrender', function() {