[pve-devel] [PATCH v2 manager 4/5] add xtermjs flag to VNCConsole iframe

Dominik Csapak d.csapak at proxmox.com
Mon Dec 4 11:51:52 CET 2017


so that we can open an xtermjs iframe instead of novnc

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes since v1:
* removed site change on destroy
 www/manager6/VNCConsole.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/www/manager6/VNCConsole.js b/www/manager6/VNCConsole.js
index 4b1b39ef..1438dd0c 100644
--- a/www/manager6/VNCConsole.js
+++ b/www/manager6/VNCConsole.js
@@ -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;
 		    }
-- 
2.11.0





More information about the pve-devel mailing list