There are several types of drives that use the same config keys. Most
notably CDRom and regular VM disks (EFI and cloudinit exist as well).
Since there is a dedicated permission for CDRom drives we need to check
permissions in more detail, depending on what type of drive it actually
is for things like the edit, remove and Add -> CDRom buttons.
The permission check in the row definition itself which only checked for
'VM.Config.Disk' permissions (never_delete) had to be removed and finer
grained checks added for the individual buttons. This also meant a bit
of reshuffling in the checks what kind of disk the current one is.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
By removing global vars 'i' and 'confid' and declaring them with let in the needed
context.
'i' wasn't necessary but had to be touched anyway.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
we always have to calculate the url correctly, not only on creation
otherwise we try to edit the token by doing a 'PUT' request on
/access/users
and not on
/access/users/USERID/token/TOKENID
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Somewhere during rendering of the window, extjs wants to add 5px to
the labelwidth for the surrounding container. Having a string here
results in the container having a width of 1505px instead of 155px and
the value of the field is far off to the right and not visible.
Changing to a number fixes that.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
as it now also includes tests for new() with non-retention options.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
Re-use the existing code, by allowing special kinds of 'tests' that just set
the options that are tested for.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This add new fields with cpu/mem percent usage of vms,
relative to host maxcpu/maxmem.
Currently, we can't sort easily most consumming vm on a host.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This API call is the predecessor of /nodes/{node}/disks/list, which has seen a
few more improvements. The latter API call should be used instead, and the web
UI already does so.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Make sure that the `Add EFI Disk` button is disabled if the user does
not have the needed permissions.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
needs an organization/bucket (previously db) and an optional token
the http client does not fit exactly in the connect/send/disconnect
scheme, so it simply creates a request in 'connect',
does the actual http connection in 'send' and nothing in 'disconnect'
max-body-size is set to 25.000.000 bytes by default (the influxdb default)
and the timeout to 1 second (same as default graphite tcp timeout)
the token (if given) gets saved in /etc/pve/priv/metricserver/$ID.pw
it is optional, because the 1.8.x compatibility api does not need
authentication (in contrast to influxdb 2.x)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
like we do in it for the storage section configs
we will need this to store the token for influxdbs http api
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
by providing the id or cfg to have better context in those methods
we will need that for influxdb http api
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
while this format is probably not much in use currently, the plan is to make it
the default format in Debian, see 'man 5 sources.list'.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
When a job is updated, verify_vzdump_parameters() is called twice. This led to
parse_property_string being called with the already parsed option.
Reported on the pve-user mailing list:
https://lists.proxmox.com/pipermail/pve-user/2021-January/172258.html
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Found by having the console open and getting a message that 'me' (the
controller) does not have a method getRootNode()
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
this was previously a display field, where submitValue defaults to
false, so we required to enable it explicitly. As it changed to a
combo box we can drop that.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
In the VM create wizard we automatically set e1000 for Windows and virtio for
Linux. We should also do this when adding a network device in the hardware
view.
OSDefaults.generic.networkCard (=e1000) is always available. Hence, leave this
as default value for the field and then try to get the ostype via API and
overwrite the default e1000.
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
once we get over the allowed line length we must move each atom
(e.g., argument or other value) to a separate line, not pairing a
few.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>