public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <dominik.csapak@gmail.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] ui: Utils: change default Console order for vms
Date: Wed, 21 Apr 2021 17:16:04 +0200	[thread overview]
Message-ID: <CACFtnYfyEP_oLk=YM8JM53kO7xi4Mh7h+jyQf-nHf1nk54M06Q@mail.gmail.com> (raw)
In-Reply-To: <20210421145116.20713-1-d.csapak@proxmox.com>

On Wed, Apr 21, 2021, 16:51 Dominik Csapak <d.csapak@proxmox.com> 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>
> ---
>  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');
>

Just noticed that this is wrong, we want to reverse this and check for
'kvm' instead, else the node and upgrade console will use spice now..

Sorry for the noise

        if (dv === 'vv' && !allowSpice) {
>             dv = allowXtermjs ? 'xtermjs' : 'html5';
>         } else if (dv === 'xtermjs' && !allowXtermjs) {
> --
> 2.20.1
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>


      reply	other threads:[~2021-04-21 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 14:51 Dominik Csapak
2021-04-21 15:16 ` Dominik Csapak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACFtnYfyEP_oLk=YM8JM53kO7xi4Mh7h+jyQf-nHf1nk54M06Q@mail.gmail.com' \
    --to=dominik.csapak@gmail.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal