diff --git a/www/manager6/button/ConsoleButton.js b/www/manager6/button/ConsoleButton.js index c5bb82761..97bed1700 100644 --- a/www/manager6/button/ConsoleButton.js +++ b/www/manager6/button/ConsoleButton.js @@ -9,6 +9,7 @@ Ext.define('PVE.button.ConsoleButton', { iconCls: 'fa fa-terminal', enableSpice: true, + enableXtermjs: true, nodename: undefined, @@ -23,6 +24,13 @@ Ext.define('PVE.button.ConsoleButton', { me.down('#spicemenu').setDisabled(!enable); }, + setEnableXtermJS: function(enable){ + var me = this; + + me.enableXtermjs = enable; + me.down('#xtermjs').setDisabled(!enable); + }, + handler: function() { var me = this; PVE.Utils.openDefaultConsoleWindow(me.enableSpice, me.consoleType, me.vmid, diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js index f68bd1f88..4620fd203 100644 --- a/www/manager6/qemu/Config.js +++ b/www/manager6/qemu/Config.js @@ -324,6 +324,7 @@ Ext.define('PVE.qemu.Config', { var status; var qmpstatus; var spice = false; + var xtermjs = false; if (!success) { status = qmpstatus = 'unknown'; @@ -336,6 +337,7 @@ Ext.define('PVE.qemu.Config', { template = rec.data.value || false; spice = s.data.get('spice') ? true : false; + xtermjs = s.data.get('serial') ? true : false; } @@ -352,6 +354,7 @@ Ext.define('PVE.qemu.Config', { } consoleBtn.setEnableSpice(spice); + consoleBtn.setEnableXtermJS(xtermjs); startBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status === 'running' || template); shutdownBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status !== 'running');