[pve-devel] [PATCH manager] ui: Utils: change default Console order for vms

Dominik Csapak d.csapak at proxmox.com
Wed Apr 21 16:51:16 CEST 2021


we want to use spice for vms more than xtermjs if both are available
(since spice must be chosen as display in that case)
so the resulting order of preference for vms is:
  spice
  xtermjs
  novnc

since all methods work for containers always, there we use
xtermjs by default, or what is chosen in the datacenter option

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

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index f502950f..a113c690 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -1271,7 +1271,7 @@ Ext.define('PVE.Utils', {
     },
 
     openDefaultConsoleWindow: function(consoles, consoleType, vmid, nodename, vmname, cmd) {
-	var dv = PVE.Utils.defaultViewer(consoles);
+	var dv = PVE.Utils.defaultViewer(consoles, consoleType);
 	PVE.Utils.openConsoleWindow(dv, consoleType, vmid, nodename, vmname, cmd);
     },
 
@@ -1309,7 +1309,7 @@ Ext.define('PVE.Utils', {
 	}
     },
 
-    defaultViewer: function(consoles) {
+    defaultViewer: function(consoles, type) {
 	var allowSpice, allowXtermjs;
 
 	if (consoles === true) {
@@ -1319,7 +1319,7 @@ Ext.define('PVE.Utils', {
 	    allowSpice = consoles.spice;
 	    allowXtermjs = !!consoles.xtermjs;
 	}
-	var dv = PVE.VersionInfo.console || 'xtermjs';
+	let dv = PVE.VersionInfo.console || (type === 'lxc' ? 'xtermjs' : 'vv');
 	if (dv === 'vv' && !allowSpice) {
 	    dv = allowXtermjs ? 'xtermjs' : 'html5';
 	} else if (dv === 'xtermjs' && !allowXtermjs) {
-- 
2.20.1





More information about the pve-devel mailing list