* [pve-devel] [PATCH manager v2] ui: Utils: change default Console order for vms
@ 2021-04-22 6:39 Dominik Csapak
2021-04-22 8:02 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 3+ messages in thread
From: Dominik Csapak @ 2021-04-22 6:39 UTC (permalink / raw)
To: pve-devel
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@proxmox.com>
---
changes from v1:
* fixed the default so that it is only 'vv' for vms, not other
types of consoles (shell, upgrade,..)
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..7fcda854 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 === 'kvm' ? 'vv' : 'xtermjs');
if (dv === 'vv' && !allowSpice) {
dv = allowXtermjs ? 'xtermjs' : 'html5';
} else if (dv === 'xtermjs' && !allowXtermjs) {
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied: [PATCH manager v2] ui: Utils: change default Console order for vms
2021-04-22 6:39 [pve-devel] [PATCH manager v2] ui: Utils: change default Console order for vms Dominik Csapak
@ 2021-04-22 8:02 ` Thomas Lamprecht
2021-04-22 8:11 ` Dominik Csapak
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Lamprecht @ 2021-04-22 8:02 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
On 22.04.21 08:39, Dominik Csapak wrote:
> 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@proxmox.com>
> ---
> changes from v1:
> * fixed the default so that it is only 'vv' for vms, not other
> types of consoles (shell, upgrade,..)
>
> www/manager6/Utils.js | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>
applied, thanks! But wondering if form VMs noVNC should be the next in line,
as long as the display property of the VM is not set to a serialX console.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] applied: [PATCH manager v2] ui: Utils: change default Console order for vms
2021-04-22 8:02 ` [pve-devel] applied: " Thomas Lamprecht
@ 2021-04-22 8:11 ` Dominik Csapak
0 siblings, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-04-22 8:11 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox VE development discussion
On 4/22/21 10:02, Thomas Lamprecht wrote:
> On 22.04.21 08:39, Dominik Csapak wrote:
>> 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@proxmox.com>
>> ---
>> changes from v1:
>> * fixed the default so that it is only 'vv' for vms, not other
>> types of consoles (shell, upgrade,..)
>>
>> www/manager6/Utils.js | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>>
>
> applied, thanks! But wondering if form VMs noVNC should be the next in line,
> as long as the display property of the VM is not set to a serialX console.
>
could be nice, but would require adaptation in the status api call
(we only return if a serial terminal is there, not the vm config)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-22 8:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 6:39 [pve-devel] [PATCH manager v2] ui: Utils: change default Console order for vms Dominik Csapak
2021-04-22 8:02 ` [pve-devel] applied: " Thomas Lamprecht
2021-04-22 8:11 ` Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox