add xtermjs flag to VNCConsole iframe

so that we can open an xtermjs iframe instead of novnc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-12-11 14:55:29 +01:00 committed by Wolfgang Bumiller
parent 30890af498
commit db97236947

View File

@ -10,6 +10,8 @@ Ext.define('PVE.noVncConsole', {
layout: 'fit',
xtermjs: false,
border: false,
initComponent : function() {
@ -31,11 +33,13 @@ Ext.define('PVE.noVncConsole', {
// at same time (to avoid performance problems)
var box = Ext.create('Ext.ux.IFrame', { itemid : "vncconsole" });
var type = me.xtermjs ? 'xtermjs' : 'novnc';
Ext.apply(me, {
items: box,
listeners: {
activate: function() {
var url = '/?console=' + me.consoleType + '&novnc=1&node=' + me.nodename + '&resize=scale';
var url = '/?console=' + me.consoleType + '&' + type + '=1&node=' + me.nodename + '&resize=scale';
if (me.vmid) {
url += '&vmid='+ me.vmid;
}