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
a488da8c24
commit
a71b43989e
@ -9,6 +9,7 @@ Ext.define('PVE.button.ConsoleButton', {
|
|||||||
iconCls: 'fa fa-terminal',
|
iconCls: 'fa fa-terminal',
|
||||||
|
|
||||||
enableSpice: true,
|
enableSpice: true,
|
||||||
|
enableXtermjs: true,
|
||||||
|
|
||||||
nodename: undefined,
|
nodename: undefined,
|
||||||
|
|
||||||
@ -23,6 +24,13 @@ Ext.define('PVE.button.ConsoleButton', {
|
|||||||
me.down('#spicemenu').setDisabled(!enable);
|
me.down('#spicemenu').setDisabled(!enable);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setEnableXtermJS: function(enable){
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
me.enableXtermjs = enable;
|
||||||
|
me.down('#xtermjs').setDisabled(!enable);
|
||||||
|
},
|
||||||
|
|
||||||
handler: function() {
|
handler: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
PVE.Utils.openDefaultConsoleWindow(me.enableSpice, me.consoleType, me.vmid,
|
PVE.Utils.openDefaultConsoleWindow(me.enableSpice, me.consoleType, me.vmid,
|
||||||
|
@ -324,6 +324,7 @@ Ext.define('PVE.qemu.Config', {
|
|||||||
var status;
|
var status;
|
||||||
var qmpstatus;
|
var qmpstatus;
|
||||||
var spice = false;
|
var spice = false;
|
||||||
|
var xtermjs = false;
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
status = qmpstatus = 'unknown';
|
status = qmpstatus = 'unknown';
|
||||||
@ -336,6 +337,7 @@ Ext.define('PVE.qemu.Config', {
|
|||||||
template = rec.data.value || false;
|
template = rec.data.value || false;
|
||||||
|
|
||||||
spice = s.data.get('spice') ? true : 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.setEnableSpice(spice);
|
||||||
|
consoleBtn.setEnableXtermJS(xtermjs);
|
||||||
|
|
||||||
startBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status === 'running' || template);
|
startBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status === 'running' || template);
|
||||||
shutdownBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status !== 'running');
|
shutdownBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status !== 'running');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user