match returns 'null' if the regex does not match, which is not
destructurable. so we have to save the match and check if it valid
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
We have 4 call sites of that, one had a fallback - the other three
was totally unchecked and triggered already exceptions on panel
render ... -.-
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
since we decode the domain list in parseACME into an array, we
have to join them again to a string when printing
otherwise printPropertyString attaches them just with ',' which
does not work here
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this is a rather complex edit window, because we dynamically create form
fields according to the schema we get from the api
to do this properly we have to handle a few things:
* we have to properly set the values on edit
* we have to properly track the original values
* we have to merge and split with/from the generic 'data' field
(so that if a plugin has some extra fields that we did not include in
the schema the user can still enter them)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This cannot work anyway, and it simplifies some editors for
format-string backed properties, like the upcoming u2f settings
integration.
If such a value was passed to the backend one would get:
> invalid format - missing key in comma-separated list property
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
simply return a empty object for cases we would get an exception
anyway, this is not wrong and allows easier usage for cases where
it's not sure if the value is set or not.
We could still do a Ext.isDebugEnabled() check and then throw up, but
this really should not matter much and I do not like if my debug mode
breaks and the non-debug not..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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@proxmox.com>
we do all necessary checks in the backend, and there we allow
whitespace in mp paths, so there is no need to restrict it in
the gui to non-whitespace characters
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
allows to catch bugs faster as we get a call trace and may see this
error even when our caller doesn't handle an undefined return value
from this method.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
this provides the grid for editing domains for letsencrypt,
order/renew the certificates, and the window for creating an
ACME account
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
before ECMA5 trailing commas in arrays and objects
are forbidden
in jslint this is an error and cannot be deactivated
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
fix various type confusion, for example:
items: {} and items: []
style: string and style: {}
also fix object['property'] access with
object.property
also fix /=/ with either '=' or /\=/ where appropriate
(/=/ can be confused with /= according to jslint)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
in one change, there is also a change from object['property']
to object.property which jslint complains about
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>