]> git.proxmox.com Git - pve-manager.git/commitdiff
enable/disable xtermjs depending on the existance of a serial port
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 26 Jan 2018 10:58:03 +0000 (11:58 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 30 Jan 2018 15:37:21 +0000 (16:37 +0100)
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>
www/manager6/button/ConsoleButton.js
www/manager6/qemu/Config.js

index c5bb827619715a59e57a9429845962deba94499a..97bed1700248599ad3d85169d9b54e2f5c2e5969 100644 (file)
@@ -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,
index f68bd1f882387e73192cc3ba2f8c43f62021e7ad..4620fd2034c62e9582de4a997d1404b2e0c28212 100644 (file)
@@ -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');