[pve-devel] applied: [PATCH v5 manager] fix #2190: Base64 encode SMBIOS value strings in order to allow more characters

Dominik Csapak d.csapak at proxmox.com
Wed Jun 12 08:25:50 CEST 2019


On 6/11/19 6:24 PM, Thomas Lamprecht wrote:
> On 6/11/19 3:31 PM, Christian Ebner wrote:
>> On some occasions e.g. license checking, the manufacturer string in the
>> SMBIOS settings edit has to allow characters such as whitespaces.
>> https://forum.proxmox.com/threads/proxmox-and-windows-rok-license-for-dell.53236/
>> In principle SMBIOS allows to pass any zero terminated string to the
>> corresponding fields in the structure type 1 (System Information).
>>
>> By base64 encoding the values clashing of the config is avoided.
>>
>> Relies on the corresponding patch to qemu-server to pass parameter verification
>> and correct parsing.
>>
>> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
>> ---
>> Version 5:
>>      * As discussed offline, allow multiline editing of the fields in the UI
>>
>>   www/manager6/Parser.js           | 31 +++++++++++++++++++++--------
>>   www/manager6/qemu/Smbios1Edit.js | 42 ++++++++++++++++++++++++++++------------
>>   2 files changed, 53 insertions(+), 20 deletions(-)
>>
> 
> applied, thanks! I followed up with making the panel static declared only,
> and actually I'd liked to used the 'defaults' [0] property to set fieldStyle
> and xtype for all those textareas, but we do not pass it along in our
> InputPanel, from which this extends, and I didn't got it to work by some
> quick tries, @Domninik to you have an idea what would be needed to actually
> make passing defaults correctly?
> 

2 issues for this:

1. inputpanel does some nesting with its items inside containers and 
does not propagate its 'defaults' properties
a workaround for this would be to set the 'defaults' of the 'defaults' e.g.

...
extends: "Proxmox.panel.InputPanel",

defaults: {
	defaults: { // this gets passed to the layout containers
		someField: 'someValue' // this gets passed to the fields
	}
}
...


alternatively we could propagate the 'defaults' to the nested containers

2. for some reason you cannot set 'fieldStyle' with defaults
(neither with the workaround above nor directly)

i guess this has something todo with the fact that 'fieldStyle' is
not a proper 'configuration' property of Ext.Form.field.Base
but i did not investigate much




More information about the pve-devel mailing list