[pve-devel] applied: [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device

2022-10-24 Thread Dominik Csapak
applied both patches, thanks ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH qemu-server 2/3] fix #3784: Parameter for guest vIOMMU & machine as property-string

2022-10-24 Thread Dominik Csapak
high level comments first: while it seems to work (just tested if there are iommu groups in the vm), i'm missing some reasons for the decisions made here: e.g. i guess we want to enable 'intremap' and that implies 'kernel-irqchip' cannot be 'full', but why do we want 'split' here? also, why cac

Re: [pve-devel] [PATCH qemu-server 3/3] added test-cases for new machine-syntax & viommu

2022-10-24 Thread Dominik Csapak
On 9/21/22 11:07, Markus Frank wrote: added a few test-cases to test the new machine parameter with viommu Signed-off-by: Markus Frank --- test/restore-config-expected/401.conf | 14 + test/restore-config-expected/402.conf | 14 + test/restore-config-input/401.conf

Re: [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox

2022-10-24 Thread Dominik Csapak
comments inline: On 9/21/22 11:07, Markus Frank wrote: Added a Checkbox to enable viommu, if q35 is selected. Otherwise (i440fx) the checkbox is disabled. The UI also needs to parse the new machine parameter as PropertyString. Signed-off-by: Markus Frank --- www/manager6/qemu/MachineEdit.js

Re: [pve-devel] [PATCH common/storage/proxmxo-backup v3] improve file-restore timeout behaviour

2022-10-25 Thread Dominik Csapak
ping, the proxmox-backup patch was applied, but the common/storage ones were not. without them it won't work should we bump file-restore ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH v3 manager 1/3 follow-up] api ceph osd: add OSD index, metadata and lv-info

2022-10-28 Thread Dominik Csapak
with this follow up, consider this series Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH manager] fix #4318: ui: qemu/Monitor: rework output retention mechanism

2022-10-31 Thread Dominik Csapak
: Dominik Csapak --- www/manager6/qemu/Monitor.js | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/www/manager6/qemu/Monitor.js b/www/manager6/qemu/Monitor.js index d85018e6..a8ecfe97 100644 --- a/www/manager6/qemu/Monitor.js +++ b/www/manager6/qemu

[pve-devel] [PATCH manager v2] fix #4318: ui: qemu/Monitor: rework output retention mechanism

2022-11-02 Thread Dominik Csapak
: Dominik Csapak --- changes from v1: * adapted to thomas suggestions * var commands => let commands (since i'm touching the line anyway) * i adapted the suggest comment from thomas, so it's more clear (imho) www/manager6/qemu/Monitor.js | 29 + 1 file changed,

[pve-devel] [PATCH http-server] upload: allow whitespaces in filenames

2022-11-04 Thread Dominik Csapak
foo (1).iso') which would reject it because of the 'wrong' extension this patch fixes that by using a more robust regex replacement fixes commit: 0fbcbc2 ("fix #3990: multipart upload: rework to fix uploading small files") Signed-off-by: Dominik Csapak --- while looking at th

[pve-devel] [PATCH manager] ui: add missing tag classes

2022-11-07 Thread Dominik Csapak
for the tags ui to properly work, these css classes are necessary Signed-off-by: Dominik Csapak --- this patch was missing in my last tags gui series, somehow i messed up during rebase and these lines got lost if i need to resend the series, i fixup the correct patches with the css styles

[pve-devel] [PATCH http-server v2 2/2] remove dead code 'parse_content_disposition'

2022-11-07 Thread Dominik Csapak
our recent change to parsing the upload headers made that code unnecessary, so remove it Signed-off-by: Dominik Csapak --- src/PVE/APIServer/AnyEvent.pm | 20 1 file changed, 20 deletions(-) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index

[pve-devel] [PATCH http-server v2 1/2] upload: allow whitespaces in filenames

2022-11-07 Thread Dominik Csapak
foo (1).iso') which would reject it because of the 'wrong' extension this patch fixes that by using trim from pve-common fixes commit: 0fbcbc2 ("fix #3990: multipart upload: rework to fix uploading small files") Signed-off-by: Dominik Csapak --- src/PVE/APIServer/AnyEvent

Re: [pve-devel] [PATCH access-control 1/1] add realmsync plugin for jobs and CRUD api for domainsync-jobs

2022-11-08 Thread Dominik Csapak
On 11/7/22 18:05, Thomas Lamprecht wrote: [snip] +returns => { + type => 'object', +}, +code => sub { + my ($param) = @_; + + my $jobs = cfs_read_file('jobs.cfg'); + my $job = $jobs->{ids}->{$param->{id}}; code style nit: please avoid using hash access inside

Re: [pve-devel] [PATCH common v3 1/1] PBSClient: file_restore_list: add timeout parameter

2022-11-08 Thread Dominik Csapak
On 11/7/22 15:17, Thomas Lamprecht wrote: subject is not wrong but worded rather confusingly, as of now it rather implies that this adds a new parameter allowing callers to control the timeout, but actually it sets the timeout hard-coded to 25s. Am 27/05/2022 um 10:22 schrieb Dominik Csapak

Re: [pve-devel] [PATCH common v3 1/1] PBSClient: file_restore_list: add timeout parameter

2022-11-08 Thread Dominik Csapak
On 11/8/22 16:53, Thomas Lamprecht wrote: Am 08/11/2022 um 12:20 schrieb Dominik Csapak: On 11/7/22 15:17, Thomas Lamprecht wrote: subject is not wrong but worded rather confusingly, as of now it rather implies that this adds a new parameter allowing callers to control the timeout, but

Re: [pve-devel] [PATCH access-control v3 1/1] PVE/AccessControl: add Hardware.* privileges and /hardware/ paths

2022-11-09 Thread Dominik Csapak
On 11/9/22 13:05, Fabian Grünbichler wrote: On September 20, 2022 2:50 pm, Dominik Csapak wrote: so that we can assign privileges on hardware level this will generate a new role (PVEHardwareAdmin) Signed-off-by: Dominik Csapak --- src/PVE/AccessControl.pm | 13 + src/PVE

Re: [pve-devel] [PATCH qemu-server v3 08/13] PVE/API2/Qemu: add permission checks for mapped pci devices

2022-11-09 Thread Dominik Csapak
On 11/9/22 13:14, Fabian Grünbichler wrote: On September 20, 2022 2:50 pm, Dominik Csapak wrote: Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 54 ++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE

Re: [pve-devel] [PATCH access-control v3 1/1] PVE/AccessControl: add Hardware.* privileges and /hardware/ paths

2022-11-09 Thread Dominik Csapak
On 11/9/22 14:06, Fabian Grünbichler wrote: On November 9, 2022 1:39 pm, Dominik Csapak wrote: On 11/9/22 13:05, Fabian Grünbichler wrote: On September 20, 2022 2:50 pm, Dominik Csapak wrote: so that we can assign privileges on hardware level this will generate a new role (PVEHardwareAdmin

[pve-devel] [PATCH common v4 1/2] PBSClient: file_restore_list: add extraParams and use timeout

2022-11-10 Thread Dominik Csapak
7;extra_params' hash parameter to 'file_restore_list' and use the timeout from there. Signed-off-by: Dominik Csapak --- changes from v3: * don't hardcode timeout, but use an extra_params hash src/PVE/PBSClient.pm | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[pve-devel] [PATCH storage v4 2/3] api: FileRestore: make use of file-restores and guis timeout mechanism

2022-11-10 Thread Dominik Csapak
new 'extraParams' of 'file_restore_list'. 25 seconds are chosen because it's under pveproxy 30s limit, with a bit of overhead to spare for the rest of the api call, like json decoding, forking, access control checks, etc. Signed-off-by: Dominik Csapak --- new in v4

[pve-devel] [PATCH common v4 2/2] PBSClient: add optional 'dynamic-memory' parameter to file-restore commands

2022-11-10 Thread Dominik Csapak
so that we can make use of the dynamic memory feature of file-restore (it automatically increases the memory of the file-restore vm when we detect a zfs path) Signed-off-by: Dominik Csapak --- new in v4 depends on the proxmox-backup patch for file-restore src/PVE/PBSClient.pm | 13

[pve-devel] [PATCH storage v4 1/3] api: FileRestore: decode and return proper error of file-restore listing

2022-11-10 Thread Dominik Csapak
estore' will fail in that case, and we try to use the return value as an array ref which fails, and the user never sees the real error message. To fix that, check the ref type of the return value and act accordingly Signed-off-by: Dominik Csapak --- no changes from v3 does not depend on rest

[pve-devel] [PATCH proxmox-backup/common/storage v4] improve file-restore timeout behaviour

2022-11-10 Thread Dominik Csapak
) since there is only one usage of that function proxmox-backup: Dominik Csapak (1): file-restore: make dynamic memory behaviour controllable proxmox-file-restore/src/block_driver.rs | 10 +++- proxmox-file-restore/src/block_driver_qemu.rs | 6 ++- proxmox-file-restore/src/main.rs

[pve-devel] [PATCH storage v4 3/3] api: FileRestore: allow automatic memory increase for privileged users

2022-11-10 Thread Dominik Csapak
if the user has the appropriate rights (details in the comments of 'check_allow_dynamic_memory') enable the dynamic memory behaviour of the file-restore binary Signed-off-by: Dominik Csapak --- new in v4: depends on pve-common 2/2 PVE/API2/Storage/FileResto

[pve-devel] [PATCH proxmox-backup v4 1/1] file-restore: make dynamic memory behaviour controllable

2022-11-10 Thread Dominik Csapak
by adding 'dynamic-memory' parameter that controls if we automatically increase the memory of the guest vm or not Signed-off-by: Dominik Csapak --- new in v4 not really happy with the 'clippy allow', but imho there is no obvious way to bundle those parameters without restruc

[pve-devel] [PATCH qemu-server 1/7] print_tabletdevice_full: make use of $q35 variable

2022-11-10 Thread Dominik Csapak
just outside of context, we already save the result from machine_type_is_q35 into the $q35 variable, but never use it. Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 0a8442c

[pve-devel] [PATCH qemu-server 2/7] move 'windows_version' to Helpers

2022-11-10 Thread Dominik Csapak
to avoid a cyclic dependency when we want to use that in PVE::QemuServer::USB Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm| 2 +- PVE/QemuServer.pm | 20 +--- PVE/QemuServer/Cloudinit.pm | 3 ++- PVE/QemuServer/Helpers.pm | 19

[pve-devel] [PATCH manager 1/2] ui: USBInputPanel: use correct maximum usb index

2022-11-10 Thread Dominik Csapak
We already have that factored out in PVE.Utils, so use that. Signed-off-by: Dominik Csapak --- www/manager6/qemu/USBEdit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js index a2204584a..4373f82c3 100644 --- a/www

[pve-devel] [PATCH manager 2/2] ui: qemu: increase available usb ports depending on machine and ostype

2022-11-10 Thread Dominik Csapak
version of the vm in the gui, this is only a heuristic for running vms. but since the actual running version could only be lower if none is set (e.g. for migrated/long-running vms) we allow more in the gui and the backend will do the proper thing (either hotplug it, or make it a pending change) Sign

[pve-devel] [PATCH qemu-server 7/7] fix #3271: USB: allow usb hotplugging for modern guests

2022-11-10 Thread Dominik Csapak
emoved) since the spice devices use the id 'usbredirdevX' instead of 'usbX', we have to manually map that a bit around Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 99 --- 1 file changed, 68 insertions(+), 31 deletions(-) diff -

[pve-devel] [PATCH qemu-server 3/7] USB: print_usbdevice_full: error out on invalid configuration

2022-11-10 Thread Dominik Csapak
should not happen normally, but an inattentive user of that function may forget to check the validity of the parsed device, so err on the safe side here Signed-off-by: Dominik Csapak --- PVE/QemuServer/USB.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/QemuServer/USB.pm b/PVE

[pve-devel] [PATCH qemu-server 4/7] USB: use machine_type_is_q35 instead of regex

2022-11-10 Thread Dominik Csapak
we refactored that into PVE::QemuServer::Machine a while ago, so we can use it here Signed-off-by: Dominik Csapak --- PVE/QemuServer/USB.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm index b669c91..10c9bca 100644 --- a/PVE

[pve-devel] [PATCH qemu-server 6/7] USB: increase max usb devices to 14 for newer machine version and ostype

2022-11-10 Thread Dominik Csapak
for machine versions >= 7.1 and ostype linux or windows > 7, we use the qemu-xhci controller where we have up to 14 usable ports, so make them available to the user Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 5 +++-- PVE/QemuServer/USB.pm | 13 + 2 files chang

[pve-devel] [PATCH qemu-server/pve-manager] use qemu-xhci for new guests

2022-11-10 Thread Dominik Csapak
ent behaviour remains Note: patch 1,2 of qemu-server are only cleanups/refactor that could be applied independently (no behaviour change intended) patch 1 of pve-manager could be squashed into 2, but if we decide not to use that heuristic in the gui, can be applied separately qemu-serve

[pve-devel] [PATCH qemu-server 5/7] fix #4324: USB: use qemu-xhci for machine versions >= 7.1

2022-11-10 Thread Dominik Csapak
eboot (which could potentially break some hardcoded guest configs) 0: https://forum.proxmox.com/threads/proxmox-usb-connect-disconnect-loop.117063/ 1: https://www.kraxel.org/blog/2018/08/qemu-usb-tips/ Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 8 +-- PVE/QemuServer/U

Re: [pve-devel] [PATCH qemu-server/pve-manager] use qemu-xhci for new guests

2022-11-10 Thread Dominik Csapak
forgot to mention: i tested the passthrough with various devices (mouse, usb key, onlykey..) and the hotplugging with live migration with hot(un)plugging multiple times in various slots without any problems ___ pve-devel mailing list pve-devel@lists.

[pve-devel] [PATCH qemu-server] tests: add tests for various combinations of configs for usb

2022-11-10 Thread Dominik Csapak
q35 + usb passthrough q35 + usb3 passthrough q35 + usb3 passthrough with new xhci controller old machine type + new usb config error old machine type + q35 + new usb config error old ostype (w2k) + new usb config error Signed-off-by: Dominik Csapak --- test/cfg2cmd/ostype-usb13-error.conf

[pve-devel] [PATCH cluster v9 3/4] datacenter.cfg: add option for tag-style

2022-11-14 Thread Dominik Csapak
its a property string containing 'tree-shape' and 'colors' the colors are formatted like this: :[:] Signed-off-by: Dominik Csapak --- changes from v8: * renamed properties data/PVE/DataCenterConfig.pm | 37 1 file changed, 37 insertions(+

[pve-devel] [PATCH widget-toolkit v9 2/2] Toolkit: add override for Ext.dd.DragDropManager

2022-11-14 Thread Dominik Csapak
to fix selection behavior for Ext.dd.DragZone. Signed-off-by: Dominik Csapak --- src/Toolkit.js | 16 1 file changed, 16 insertions(+) diff --git a/src/Toolkit.js b/src/Toolkit.js index 4381f46..2f4a01a 100644 --- a/src/Toolkit.js +++ b/src/Toolkit.js @@ -686,6 +686,22

[pve-devel] [PATCH manager v9 02/12] api: add /ui-options api call

2022-11-14 Thread Dominik Csapak
which contains ui relevant options, like the console preference and tag-style also contains the list of allowed tags Signed-off-by: Dominik Csapak --- changes from v8: * add 'allowed-tags' too maybe we want the 'allowed-tags' somewhere else? though we only use it for the ui

[pve-devel] [PATCH qemu-server v9 1/1] api: update: improve tag privilege check

2022-11-14 Thread Dominik Csapak
'normal' tags require 'VM.Config.Options' on '/vm/', but not allowed tags (either limited with 'user-tag-access' or 'privileged-tags' in the datacenter config) require 'Sys.Modify' on '/' this patch implements the proper check

[pve-devel] [PATCH cluster/qemu-server/container/wt/manager v9] add tags to ui

2022-11-14 Thread Dominik Csapak
rop changes into the intial patches) * squashed some patches together that fit together * fixed some drag&drop bugs, so it should now work much better (omitted older changelog) Dominik Csapak (4): add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method Cluster: add get_guest_config_properties data

[pve-devel] [PATCH manager v9 04/12] ui: parse and save tag infos from /ui-options

2022-11-14 Thread Dominik Csapak
Utils Signed-off-by: Dominik Csapak --- changes from v8: * also parses the allowed tag into the taglist now (and don't parse it from the tree anymore, since that should be the same) www/manager6/Utils.js | 60 ++- 1 file changed, 59 insertions(+), 1 dele

[pve-devel] [PATCH widget-toolkit v9 1/2] add tag related helpers

2022-11-14 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- src/Utils.js | 88 src/css/ext6-pmx.css | 45 ++ 2 files changed, 133 insertions(+) diff --git a/src/Utils.js b/src/Utils.js index e9b84f8..7255e3f 100644 --- a/src/Utils.js +++ b/src

[pve-devel] [PATCH manager v9 07/12] ui: dc/OptionView: add editors for tag settings

2022-11-14 Thread Dominik Csapak
namely for 'tag-style' (shape & colors), 'user-tag-acces', and 'privileged tags'. display the tag overrides directly as they will appear as tags Signed-off-by: Dominik Csapak --- changes for v www/manager6/Utils.js | 20 w

[pve-devel] [PATCH cluster v9 1/4] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-11-14 Thread Dominik Csapak
adding a second property only adds a bit of additional time (in this case ~30%) Signed-off-by: Dominik Csapak --- data/src/cfs-ipc-ops.h | 2 + data/src/server.c | 64 +++ data/src/status.c | 177 - data/src/status.h

[pve-devel] [PATCH cluster v9 2/4] Cluster: add get_guest_config_properties

2022-11-14 Thread Dominik Csapak
akin to get_guest_config_property, but with a list of properties. uses the new CFS_IPC_GET_GUEST_CONFIG_PROPERTIES also adds the same NOTEs regarding parsing/permissions to the comment of get_guest_config_property Signed-off-by: Dominik Csapak --- data/PVE/Cluster.pm | 27

[pve-devel] [PATCH manager v9 01/12] api: /cluster/resources: add tags to returned properties

2022-11-14 Thread Dominik Csapak
by querying 'lock' and 'tags' with 'get_guest_config_properties' Signed-off-by: Dominik Csapak --- PVE/API2/Cluster.pm | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 49e319a5c..3

[pve-devel] [PATCH container v9 1/1] check_ct_modify_config_perm: improve tag privilege check

2022-11-14 Thread Dominik Csapak
'normal' tags require 'VM.Config.Options' on '/vm/', but not allowed tags (either limited with 'user-tag-access' or 'privileged-tags' in the datacenter config) require 'Sys.Modify' on '/' this patch implements the proper check

[pve-devel] [PATCH cluster v9 4/4] datacenter.cfg: add tag rights control to the datacenter config

2022-11-14 Thread Dominik Csapak
ins' ('Sys.Modify' on '/') also add a helper 'get_allowed_tags' that returns the allowed (existing) tags, the privileged tags, and if a user can enter 'freeform' tags. Signed-off-by: Dominik Csapak --- changes from v8: * renamed properties * improved descriptions

[pve-devel] [PATCH manager v9 03/12] ui: call '/ui-options' and save the result in PVE.UIOptions

2022-11-14 Thread Dominik Csapak
and move the use of the console from VersionInfo to here, since this will be the future place for ui related backend options. Signed-off-by: Dominik Csapak --- changes from v8: * moved the logic into Utils, since we'll want to use that more regularly www/manager6/Utils.js

[pve-devel] [PATCH manager v9 11/12] ui: tree/ResourceTree: show Tags in tree

2022-11-14 Thread Dominik Csapak
and update the treenodes when the tags change. since we change the vm node text (which we pass through to the config panel), we have to change how we generate the text there slightly (otherwise that would include the rendered tags) Signed-off-by: Dominik Csapak --- changes from v8: * merged the

[pve-devel] [PATCH manager v9 06/12] ui: add PVE.form.ListField

2022-11-14 Thread Dominik Csapak
a field which contains just a list of textfields, e.g. useful for a list of simple tags Signed-off-by: Dominik Csapak --- new in v9 www/manager6/Makefile | 1 + www/manager6/form/ListField.js | 165 + 2 files changed, 166 insertions(+) create mode

[pve-devel] [PATCH manager v9 10/12] ui: {lxc, qemu}/Config: show Tags and make them editable

2022-11-14 Thread Dominik Csapak
add the tags in the status line, and add a button for adding new ones Signed-off-by: Dominik Csapak --- www/manager6/lxc/Config.js | 32 ++-- www/manager6/qemu/Config.js | 31 +-- 2 files changed, 59 insertions(+), 4 deletions(-) diff

[pve-devel] [PATCH manager v9 05/12] ui: add form/TagColorGrid

2022-11-14 Thread Dominik Csapak
this provides a basic grid to edit a list of tag color overrides. We'll use this for editing the datacenter.cfg overrides and the browser storage overrides. Signed-off-by: Dominik Csapak --- www/css/ext6-pve.css | 5 + www/manager6/Makefile | 1 + www/man

[pve-devel] [PATCH manager v9 09/12] ui: add form/TagEdit.js

2022-11-14 Thread Dominik Csapak
he tags in the list when done with editing (by clicking the checkmark), sends a 'change' event with the new tags Signed-off-by: Dominik Csapak --- changes from v8: * added missing css classed www/css/ext6-pve.css | 23 ++- www/manager6/Makefile| 1 + www/manager6/f

[pve-devel] [PATCH manager v9 08/12] ui: add form/Tag

2022-11-14 Thread Dominik Csapak
xt) shows the tag by default, and if put in editable mode, makes the span editable. when actually starting the edit, shows a picker with available tags to select from Signed-off-by: Dominik Csapak --- changes from v8: * added missing css classes * added emulated textbox style (white-background+bo

[pve-devel] [PATCH manager v9 12/12] ui: add tags to ResourceGrid and GlobalSearchField

2022-11-14 Thread Dominik Csapak
also allows to search for tags in the GlobalSearchField where each tag is treated like a seperate field, so it weighs more if the user searches for the exact string of a single tag Signed-off-by: Dominik Csapak ui: ResourceGrid: render tags with the 'full' styling Signed-off-b

[pve-devel] [PATCH cluster v10 2/5] Cluster: add get_guest_config_properties

2022-11-15 Thread Dominik Csapak
akin to get_guest_config_property, but with a list of properties. uses the new CFS_IPC_GET_GUEST_CONFIG_PROPERTIES also adds the same NOTEs regarding parsing/permissions to the comment of get_guest_config_property Signed-off-by: Dominik Csapak --- data/PVE/Cluster.pm | 27

[pve-devel] [PATCH cluster/guest-common/qemu-server/container/wt/manager v10 0/5] add tags to ui

2022-11-15 Thread Dominik Csapak
field * imroved wording + description * improved commit messages * changed how we collect the taglist for the tag picker * mention the tags in the privilige check * added the allowed tags to the ui-options (omitted older changelog) pve-cluster: Dominik Csapak (5): add CFS_IPC_GET_GUEST_CONFI

[pve-devel] [PATCH cluster v10 5/5] datacenter.cfg: add 'ordering' to 'tag-style' config

2022-11-15 Thread Dominik Csapak
such that the admin can decide if the tags should be sorted in the gui Signed-off-by: Dominik Csapak --- new in v10 data/PVE/DataCenterConfig.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/data/PVE/DataCenterConfig.pm b/data/PVE/DataCenterConfig.pm index ae138f9..658cfd9 100644

[pve-devel] [PATCH container v10 1/1] check_ct_modify_config_perm: check for tags permissions with 'assert_tag_permissions'

2022-11-15 Thread Dominik Csapak
from GuestHelpers. This function checks all necessary permissions and raises an exception if the user does not have the correct ones. This is necessary for the new 'privileged' tags and 'user-tag-access' permissions to work. Signed-off-by: Dominik Csapak --- changes from v9

[pve-devel] [PATCH cluster v10 3/5] datacenter.cfg: add option for tag-style

2022-11-15 Thread Dominik Csapak
its a property string containing 'tree-shape' and 'colors' the colors are formatted like this: :[:] Signed-off-by: Dominik Csapak --- data/PVE/DataCenterConfig.pm | 37 1 file changed, 37 insertions(+) diff --git a/data/PVE/DataCenter

[pve-devel] [PATCH guest-common v10 1/1] GuestHelpers: add 'assert_tag_permissions'

2022-11-15 Thread Dominik Csapak
gs require 'VM.Config.Options' on '/vms/', but not allowed tags (either limited with 'user-tag-access' or 'privileged-tags' in the datacenter.cfg) requrie 'Sys.Modify' on '/' Signed-off-by: Dominik Csapak --- new in v10, but the code is

[pve-devel] [PATCH manager v10 06/13] ui: add PVE.form.ListField

2022-11-15 Thread Dominik Csapak
a field which contains just a list of textfields, e.g. useful for a list of simple tags Signed-off-by: Dominik Csapak --- www/manager6/Makefile | 1 + www/manager6/form/ListField.js | 165 + 2 files changed, 166 insertions(+) create mode 100644 www

[pve-devel] [PATCH cluster v10 4/5] datacenter.cfg: add tag rights control to the datacenter config

2022-11-15 Thread Dominik Csapak
ins' ('Sys.Modify' on '/') also add a helper 'get_allowed_tags' that returns the allowed (existing) tags, the privileged tags, and if a user can enter 'freeform' tags. Signed-off-by: Dominik Csapak --- changes from v9: * get_allowed_tags now takes a bool + closure fo

[pve-devel] [PATCH manager v10 13/13] ui: implement tag ordering from datacenter.cfg

2022-11-15 Thread Dominik Csapak
ig Signed-off-by: Dominik Csapak --- new in v10 www/css/ext6-pve.css | 5 + www/manager6/Utils.js | 7 +++ www/manager6/dc/OptionView.js | 17 + www/manager6/form/TagEdit.js | 13 - 4 files changed, 41 insertions(+), 1 deletion(-) diff --git

[pve-devel] [PATCH cluster v10 1/5] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-11-15 Thread Dominik Csapak
adding a second property only adds a bit of additional time (in this case ~30%) Signed-off-by: Dominik Csapak --- changes from v9: * line_len, prop_len -> size_t * document min/max * remove setting of null byte in loop (it's already split at the null byte) * improved the loop for skipping

[pve-devel] [PATCH widget-toolkit v10 2/2] Toolkit: add override for Ext.dd.DragDropManager

2022-11-15 Thread Dominik Csapak
to fix selection behavior for Ext.dd.DragZone. Signed-off-by: Dominik Csapak --- src/Toolkit.js | 16 1 file changed, 16 insertions(+) diff --git a/src/Toolkit.js b/src/Toolkit.js index 4381f46..2f4a01a 100644 --- a/src/Toolkit.js +++ b/src/Toolkit.js @@ -686,6 +686,22

[pve-devel] [PATCH manager v10 01/13] api: /cluster/resources: add tags to returned properties

2022-11-15 Thread Dominik Csapak
by querying 'lock' and 'tags' with 'get_guest_config_properties' Signed-off-by: Dominik Csapak --- PVE/API2/Cluster.pm | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 49e319a5c..3

[pve-devel] [PATCH qemu-server v10 1/1] api: update: check for tags permissions with 'assert_tag_permissions'

2022-11-15 Thread Dominik Csapak
from GuestHelpers. This function checks all necessary permissions and raises an exception if the user does not have the correct ones. This is necessary for the new 'privileged' tags and 'user-tag-access' permissions to work. Signed-off-by: Dominik Csapak --- changes from v9

[pve-devel] [PATCH manager v10 02/13] api: add /ui-options api call

2022-11-15 Thread Dominik Csapak
which contains ui relevant options, like the console preference and tag-style also contains the list of allowed tags Signed-off-by: Dominik Csapak --- PVE/API2.pm | 61 + 1 file changed, 61 insertions(+) diff --git a/PVE/API2.pm b/PVE/API2.pm

[pve-devel] [PATCH manager v10 04/13] ui: parse and save tag infos from /ui-options

2022-11-15 Thread Dominik Csapak
Utils Signed-off-by: Dominik Csapak --- changes from v9: * remove unused global 'override' event * refactored the UIOptions update function and updateTagSettings a bit (now takes the full 'tag-style' object and handles it) www/manager6/Utils.js | 56 +++

[pve-devel] [PATCH manager v10 03/13] ui: call '/ui-options' and save the result in PVE.UIOptions

2022-11-15 Thread Dominik Csapak
and move the use of the console from VersionInfo to here, since this will be the future place for ui related backend options. Signed-off-by: Dominik Csapak --- www/manager6/Utils.js | 12 +++- www/manager6/Workspace.js | 2 ++ www/manager6/dc/OptionView.js | 4 ++-- 3

[pve-devel] [PATCH widget-toolkit v10 1/2] add tag related helpers

2022-11-15 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- changes from v9: * tags are now 'inline-block' and for boundlists have a line-height of 15px (fixes an overflow issue) src/Utils.js | 88 src/css/ext6-pmx.css | 52 ++ 2 fil

[pve-devel] [PATCH manager v10 07/13] ui: dc/OptionView: add editors for tag settings

2022-11-15 Thread Dominik Csapak
namely for 'tag-tree-style' and 'tag-colors'. display the tag overrides directly as they will appear as tags Signed-off-by: Dominik Csapak --- changes from v9: * now also sets PVE.UIOptions * adapt to change of updateTagSettings www/manager6/Utils.js | 20 +

[pve-devel] [PATCH manager v10 10/13] ui: {lxc, qemu}/Config: show Tags and make them editable

2022-11-15 Thread Dominik Csapak
add the tags in the status line, and add a button for adding new ones Signed-off-by: Dominik Csapak --- www/manager6/lxc/Config.js | 32 ++-- www/manager6/qemu/Config.js | 31 +-- 2 files changed, 59 insertions(+), 4 deletions(-) diff

[pve-devel] [PATCH manager v10 09/13] ui: add form/TagEdit.js

2022-11-15 Thread Dominik Csapak
he tags in the list when done with editing (by clicking the checkmark), sends a 'change' event with the new tags Signed-off-by: Dominik Csapak --- changes from v9: * listen to glable event and render list of tags new www/css/ext6-pve.css | 23 ++- www/manager6/Makefile

[pve-devel] [PATCH manager v10 05/13] ui: add form/TagColorGrid

2022-11-15 Thread Dominik Csapak
this provides a basic grid to edit a list of tag color overrides. We'll use this for editing the datacenter.cfg overrides and the browser storage overrides. Signed-off-by: Dominik Csapak --- www/css/ext6-pve.css | 5 + www/manager6/Makefile | 1 + www/man

[pve-devel] [PATCH manager v10 08/13] ui: add form/Tag

2022-11-15 Thread Dominik Csapak
xt) shows the tag by default, and if put in editable mode, makes the span editable. when actually starting the edit, shows a picker with available tags to select from Signed-off-by: Dominik Csapak --- changes from v9: * don't listen to the global event anymore www/css/ext6-pve.css |

[pve-devel] [PATCH manager v10 11/13] ui: tree/ResourceTree: show Tags in tree

2022-11-15 Thread Dominik Csapak
and update the treenodes when the tags change. since we change the vm node text (which we pass through to the config panel), we have to change how we generate the text there slightly (otherwise that would include the rendered tags) Signed-off-by: Dominik Csapak --- www/manager6/data

[pve-devel] [PATCH manager v10 12/13] ui: add tags to ResourceGrid and GlobalSearchField

2022-11-15 Thread Dominik Csapak
also allows to search for tags in the GlobalSearchField where each tag is treated like a seperate field, so it weighs more if the user searches for the exact string of a single tag Signed-off-by: Dominik Csapak ui: ResourceGrid: render tags with the 'full' styling Signed-off-b

[pve-devel] [PATCH manager] ui: BackupEdit: fix reset tracking

2022-11-15 Thread Dominik Csapak
when the mode changes, we set the pool selector visible/hidden, but we never disabled/enabled it. this tripped up the dirty state of the form always showing the reset button as enabled. to fix it, properly enable/disable it Signed-off-by: Dominik Csapak --- www/manager6/dc/Backup.js | 2 ++ 1

Re: [pve-devel] [PATCH cluster v10 4/5] datacenter.cfg: add tag rights control to the datacenter config

2022-11-16 Thread Dominik Csapak
most of the points are clear and ok for me, but [snip] + format => $user_tag_privs_format, + }, + 'privileged-tags' => { + optional => 1, + type => 'string', + description => "A list of tags that require a `Sys.Modify` on '/') to set and delete

Re: [pve-devel] [PATCH cluster v10 4/5] datacenter.cfg: add tag rights control to the datacenter config

2022-11-16 Thread Dominik Csapak
On 11/16/22 09:54, Thomas Lamprecht wrote: Am 16/11/2022 um 09:47 schrieb Dominik Csapak: I am not sure the second sentence is necessary, or rather, wouldn't it be better to make the two lists mutually exclusive? e.g., by removing privileged tags from the other list? i don't real

Re: [pve-devel] [PATCH cluster v10 4/5] datacenter.cfg: add tag rights control to the datacenter config

2022-11-16 Thread Dominik Csapak
On 11/16/22 10:31, Fabian Grünbichler wrote: On November 16, 2022 10:10 am, Thomas Lamprecht wrote: Am 16/11/2022 um 10:04 schrieb Dominik Csapak: On 11/16/22 09:54, Thomas Lamprecht wrote: Am 16/11/2022 um 09:47 schrieb Dominik Csapak: I am not sure the second sentence is necessary, or

Re: [pve-devel] [PATCH manager v10 09/13] ui: add form/TagEdit.js

2022-11-16 Thread Dominik Csapak
On 11/16/22 16:00, Thomas Lamprecht wrote: subject -> s!form/TagEdit.js!PVE.panel.TagEditContainer component! Am 15/11/2022 um 14:02 schrieb Dominik Csapak: +Ext.define('PVE.panel.TagEditContainer', { +extend: 'Ext.container.Container', +alias: 'widget

[pve-devel] [PATCH cluster v11 4/5] datacenter.cfg: add tag rights control to the datacenter config

2022-11-16 Thread Dominik Csapak
ins' ('Sys.Modify' on '/') also add a helper 'get_allowed_tags' that returns the allowed (existing) tags, the privileged tags, and if a user can enter 'freeform' tags. Signed-off-by: Dominik Csapak --- data/PVE/DataCenterConfig.pm | 65 ++

[pve-devel] [PATCH cluster/guest-common/qemu-server/ct/manager v11] add tags to ui

2022-11-16 Thread Dominik Csapak
7;tag-style' property with this the tags will be sorted in the gui (ui only) i left the patches separately (omitted older changelog) pve-cluster: Dominik Csapak (5): add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method Cluster: add get_guest_config_properties datacenter.cfg: add opti

[pve-devel] [PATCH cluster v11 2/5] Cluster: add get_guest_config_properties

2022-11-16 Thread Dominik Csapak
akin to get_guest_config_property, but with a list of properties. uses the new CFS_IPC_GET_GUEST_CONFIG_PROPERTIES also adds the same NOTEs regarding parsing/permissions to the comment of get_guest_config_property Signed-off-by: Dominik Csapak --- data/PVE/Cluster.pm | 27

[pve-devel] [PATCH manager v11 03/13] ui: save ui options from /cluster/options instead of version

2022-11-16 Thread Dominik Csapak
/cluster/options is now the go to place for getting these options (until we have more options unrelated to the datacenter.cfg) Also move the use of the console from VersionInfo to here, since this will be the future place for ui related backend options. Signed-off-by: Dominik Csapak --- www

[pve-devel] [PATCH cluster v11 3/5] datacenter.cfg: add option for tag-style

2022-11-16 Thread Dominik Csapak
its a property string containing 'tree-shape' and 'colors' the colors are formatted like this: :[:] Signed-off-by: Dominik Csapak --- data/PVE/DataCenterConfig.pm | 37 1 file changed, 37 insertions(+) diff --git a/data/PVE/DataCenter

[pve-devel] [PATCH cluster v11 5/5] datacenter.cfg: add 'ordering' to 'tag-style' config

2022-11-16 Thread Dominik Csapak
such that the admin can decide if the tags should be sorted in the gui Signed-off-by: Dominik Csapak --- data/PVE/DataCenterConfig.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/data/PVE/DataCenterConfig.pm b/data/PVE/DataCenterConfig.pm index 0836891..f72974e 100644 --- a/data

[pve-devel] [PATCH manager v11 10/13] ui: {lxc, qemu}/Config: show Tags and make them editable

2022-11-16 Thread Dominik Csapak
add the tags in the status line, and add a button for adding new ones Signed-off-by: Dominik Csapak --- www/manager6/lxc/Config.js | 32 ++-- www/manager6/qemu/Config.js | 31 +-- 2 files changed, 59 insertions(+), 4 deletions(-) diff

[pve-devel] [PATCH manager v11 11/13] ui: tree/ResourceTree: show Tags in tree

2022-11-16 Thread Dominik Csapak
and update the treenodes when the tags change. since we change the vm node text (which we pass through to the config panel), we have to change how we generate the text there slightly (otherwise that would include the rendered tags) Signed-off-by: Dominik Csapak --- www/manager6/data

[pve-devel] [PATCH manager v11 01/13] api: /cluster/resources: add tags to returned properties

2022-11-16 Thread Dominik Csapak
by querying 'lock' and 'tags' with 'get_guest_config_properties' Signed-off-by: Dominik Csapak --- PVE/API2/Cluster.pm | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index dc575d85b..3

[pve-devel] [PATCH container v11 1/1] check_ct_modify_config_perm: check for tags permissions with 'assert_tag_permissions'

2022-11-16 Thread Dominik Csapak
from GuestHelpers. This function checks all necessary permissions and raises an exception if the user does not have the correct ones. This is necessary for the new 'privileged' tags and 'user-tag-access' permissions to work. Signed-off-by: Dominik Csapak --- src/PVE/LXC

[pve-devel] [PATCH qemu-server v11 1/1] api: update: check for tags permissions with 'assert_tag_permissions'

2022-11-16 Thread Dominik Csapak
from GuestHelpers. This function checks all necessary permissions and raises an exception if the user does not have the correct ones. This is necessary for the new 'privileged' tags and 'user-tag-access' permissions to work. Signed-off-by: Dominik Csapak --- P

[pve-devel] [PATCH manager v11 04/13] ui: parse and save tag infos from /cluster/options

2022-11-16 Thread Dominik Csapak
Utils Signed-off-by: Dominik Csapak --- www/manager6/Utils.js | 60 +-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 6ce22ded5..7137a3a25 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/

[pve-devel] [PATCH manager v11 02/13] api: allow all users to (partially) read datacenter.cfg

2022-11-16 Thread Dominik Csapak
users privileges and the datacenter config. Signed-off-by: Dominik Csapak --- PVE/API2.pm | 3 ++- PVE/API2/Cluster.pm | 24 ++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/PVE/API2.pm b/PVE/API2.pm index a42561604..6703b941a 100644 --- a/PVE/API2.pm

<    4   5   6   7   8   9   10   11   12   13   >