enable/disable xtermjs depending on the existance of a serial port
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
986d13b2bc
commit
8a0d40f188
@ -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,
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user