On 03.09.19 12:13, Dominic Jäger wrote: > Add a setting to choose the scale mode of the noVNC pop-up as well as > the embedded console in the content panel to "My Settings". Having both > set to local scaling was the most important use-case for the users. One > setting for both places is the simplest solution making this possible. > > The new section (fieldset) makes adding further options such as > "Local Cursor" easy. > > Co-developed-by: Thomas Lamprecht <t.lampre...@proxmox.com> > Signed-off-by: Dominic Jäger <d.jae...@proxmox.com> > --- > Please view with -w option. I did gg=G after moving some elements around. > v1->v2: > - Reference name without hyphen > - radiogroup instead of radiofields to get and set values > - Move noVNC settings into their own section
applied thanks, did two followups though: 1. see below 2. move the selector to the same line as the "Scaling mode" label, as IMO it reduces space usage a bit and looks more like the rest of our interface (I know that Layout and username reset are not like this too, but IMO they should be) > > www/manager6/Utils.js | 3 +- > www/manager6/VNCConsole.js | 3 +- > www/manager6/window/Settings.js | 336 ++++++++++++++++++-------------- > 3 files changed, 199 insertions(+), 143 deletions(-) > > diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js > index 6838ef2f..36732a37 100644 > --- a/www/manager6/Utils.js > +++ b/www/manager6/Utils.js > @@ -960,13 +960,14 @@ Ext.define('PVE.Utils', { utilities: { > }, > > openVNCViewer: function(vmtype, vmid, nodename, vmname, cmd) { > + var sp = Ext.state.Manager.getProvider(); > var url = Ext.Object.toQueryString({ > console: vmtype, // kvm, lxc, upgrade or shell > novnc: 1, > vmid: vmid, > vmname: vmname, > node: nodename, > - resize: 'off', > + resize: sp.get('novnc-scaling'), to ensure fallback is still the same default, replaced with sp.get('novnc-scaling', 'off'), > cmd: cmd > }); > var nw = window.open("?" + url, '_blank', > "innerWidth=745,innerheight=427"); > diff --git a/www/manager6/VNCConsole.js b/www/manager6/VNCConsole.js > index cd8fa243..22c82257 100644 > --- a/www/manager6/VNCConsole.js > +++ b/www/manager6/VNCConsole.js > @@ -41,12 +41,13 @@ Ext.define('PVE.noVncConsole', { > items: box, > listeners: { > activate: function() { > + var sp = Ext.state.Manager.getProvider(); > var queryDict = { > console: me.consoleType, // kvm, lxc, upgrade or shell > vmid: me.vmid, > node: me.nodename, > cmd: me.cmd, > - resize: 'scale' > + resize: sp.get('novnc-scaling'), to ensure fallback is still the same default, replaced with sp.get('novnc-scaling', 'scale'), > }; > queryDict[type] = 1; > PVE.Utils.cleanEmptyObjectKeys(queryDict); _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel