Commit Graph

42 Commits

Author SHA1 Message Date
Dominik Csapak
308d9f365c ui: Parser: fix bind and dev mounts for lxc
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>
2021-05-20 21:01:49 +02:00
Thomas Lamprecht
c57ff36d38 ui: parser: fixup printLxcMountPoint object iteration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 08:45:29 +02:00
Thomas Lamprecht
f155d934e2 ui: parser: fixup printing LXC network
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:42:35 +02:00
Thomas Lamprecht
a3aef0f5d9 ui: parser: eslint fixes and refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 17:30:39 +02:00
Thomas Lamprecht
c4cfc250bb ui: parser: drop old openVZ parser
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 15:49:27 +02:00
Lorenz Stechauner
91c729d300 fix #3426: ui: parser: adapt parseSSHKey to accept "sk-" prefix
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-05-17 15:42:49 +02:00
Dominik Csapak
ced67201ad ui: Parser: respect mtu in {parse, print}QemuNetwork
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 12:15:10 +02:00
Thomas Lamprecht
fa8d397162 ui: eslint: some more trailing comma fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:48:50 +01:00
Thomas Lamprecht
399ffa767f ui: eslint: enforce "dot-notation" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:45:01 +01:00
Thomas Lamprecht
d2021707e3 ui: eslint: enforce "no-extra-boolean-cast" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:43:40 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
6ac64c3aed fix undefined access on acme variable
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>
2020-05-06 19:11:13 +02:00
Dominik Csapak
899c4f4538 ui: Parser: add printACME
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>
2020-05-06 17:49:35 +02:00
Dominik Csapak
457088917b ui: add ACMEPluginEdit window
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>
2020-05-05 19:23:04 +02:00
Fabian Grünbichler
08a61c7b30 www: fix acme parser
not yet for the new features/keys, but the old one was broken already..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Thomas Lamprecht
08e38f032d ui: printPropertyString: skip empty string values
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>
2019-11-26 17:00:29 +01:00
Thomas Lamprecht
4a7248d4ea ui: make parsePropertyString less picky
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>
2019-10-04 16:20:24 +02:00
Thomas Lamprecht
6de2baee56 ui/Parser: printPropertyString: sort non-defaultKey parts for stability
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 14:57:40 +02:00
Christian Ebner
150ad74a2c fix #2190: Base64 encode SMBIOS value strings in order to allow more characters
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>
2019-06-11 17:42:33 +02:00
Thomas Lamprecht
f92943e2f8 make jslint happier
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 07:46:59 +00:00
Wolfgang Bumiller
1cdb49c199 www: parser: add parseTfaType helper
The tfa keys can now contain the type as additional
information, so let's parse it out.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 07:02:05 +00:00
Dominik Csapak
805a7cb8b2 ui: parser use parseBoolean for firewall
so we detect on/ff,true/false,1/0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-04 16:59:04 +02:00
Thomas Lamprecht
95e77b22cc ui: ct: fix displaying nic firewall if explicitly 0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-04 16:11:28 +02:00
Dominik Csapak
a108c35aaa gui: allow whitespace in mp paths
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>
2018-08-22 11:15:53 +02:00
Thomas Lamprecht
8007aaaf87 ui/Parser: printPropertyString: simplify and always put defaultKey values first
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-02 16:20:12 +02:00
Thomas Lamprecht
9bbdcdff03 ui/Parser: parsePropertyString: log errors to console
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>
2018-08-02 16:20:12 +02:00
Stoiko Ivanov
3d6189d304 ui/Parser: add generic functions property_strings
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-08-02 16:01:12 +02:00
Dominik Csapak
488be4c2c0 add node/ACME.js
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>
2018-05-04 16:11:00 +02:00
Dominik Csapak
01e02121c7 add qemu IPConfigEdit for CloudInit
resembles the lxc IPConfigEdit, but is slightly different

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-16 10:05:57 +01:00
Wolfgang Bumiller
b1339314b6 lxc: wizard: ssh key 2016-08-19 13:54:38 +02:00
Dominik Csapak
22f2f9d6c0 jslint: remove trailing commas
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>
2016-04-29 17:06:34 +02:00
Dominik Csapak
ec0bd652db jslint: fix type confusion and property access
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>
2016-04-29 17:06:23 +02:00
Dominik Csapak
84de645d34 jslint: fix curly braces for if
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>
2016-04-29 17:05:44 +02:00
Dietmar Maurer
6efbc4cb9d lxc rate limit: do not write value 0 (simply omit value) 2016-04-22 10:13:31 +02:00
Dietmar Maurer
519ca7fafe LXC GUI: add network rate limit 2016-04-22 09:14:09 +02:00
Wolfgang Bumiller
63e62a6f89 whitespace cleanup 2016-04-11 11:56:40 +02:00
Wolfgang Bumiller
a2ed069746 qemu: parse vlan trunks
Fixes an error when trying to edit a network with assigned
trunks.
2016-04-11 11:56:32 +02:00
Wolfgang Bumiller
283b450ec5 parser: fix case sensitivity when classifying mountpoints 2016-03-18 16:27:03 +01:00
Emmanuel Kasper
4c1c0d5d2a copy missing methods from ExtJS 4 Parser.js 2016-03-09 18:02:28 +01:00
Dietmar Maurer
bac5bd135c rename manager5 to manager6 2016-01-22 11:24:10 +01:00