[pve-devel] [PATCH manager 2/2] improve default console behaviour

Dominik Csapak d.csapak at proxmox.com
Fri Jul 12 13:33:07 CEST 2019


instead of instantly defaulting to novnc when the chosen
default is not available, try the other (better variant)
before falling back to novnc

e.g. having no default set is equivalent to having it set
to xtermjs, and having a vm with spice then previously
defaulted to novnc, now to spice (the reverse is also true)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/Utils.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index d72ba64f..95345be8 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -946,8 +946,10 @@ Ext.define('PVE.Utils', { utilities: {
 	    allowXtermjs = !!consoles.xtermjs;
 	}
 	var dv = PVE.VersionInfo.console || 'xtermjs';
-	if ((dv === 'vv' && !allowSpice) || (dv === 'xtermjs' && !allowXtermjs)) {
-	    dv = 'html5';
+	if (dv === 'vv' && !allowSpice) {
+	    dv = (allowXtermjs) ? 'xtermjs' : 'html5';
+	} else if (dv === 'xtermjs' && !allowXtermjs) {
+	    dv = (allowSpice) ? 'vv' : 'html5';
 	}
 
 	return dv;
-- 
2.20.1





More information about the pve-devel mailing list