From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E5AB5754D1 for ; Wed, 21 Apr 2021 16:51:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E2BF9117E9 for ; Wed, 21 Apr 2021 16:51:17 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 72F0A117E4 for ; Wed, 21 Apr 2021 16:51:17 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4B81A4627B for ; Wed, 21 Apr 2021 16:51:17 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Wed, 21 Apr 2021 16:51:16 +0200 Message-Id: <20210421145116.20713-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.000 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager] ui: Utils: change default Console order for vms X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 14:51:17 -0000 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 --- 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