public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH cluster/guest-common/qemu-server/ct/manager v11] add tags to ui
Date: Wed, 16 Nov 2022 16:47:54 +0100	[thread overview]
Message-ID: <20221116154815.358385-1-d.csapak@proxmox.com> (raw)

this series brings the already existing 'tags' for ct/vms to the gui:
* tags can be edited in the status toolbar of the guest
* existing tags will be shown in the tree/global search/resource grids
* when editing a tag, a list of tags will be shown
* by default, the color is (consistently) autogenerated based on the
  text
* that color can be overridden in datacenter -> options (cluster wide)
  (edit window for browser local storage is TBD)
* by default, the text color is either white or black, depending which
  provides the greater contrast (according to SAPC)
* this text color can also be overridden
* there are multiple shapes available for the tree
* implements some permission control in datacenter.cfg with
  'user-tag-access' and 'registered-tags' with that it's possible to have
  better control over what tags a user can actually add to its guests
  i intentionally left out the gui for those for now, but they shouldn't
  be that hard to add, should we go this way

changes from v10:
* adapted c code to wolfgangs requests
  - make the config \n terminated if it's not already
  - comment that lines must be null terminated
  - better types
* renamed 'privileged-tags' to 'registered-tags' (also in the ui)
* moved 'get_allowed_tags' into pve-guest-common
* internal improvements in assert_tag_permissions
* made alphabetical ordering the default (@thomas request)
* removed /ui-options, reused /cluster/options for that
* show warning in gui when tag is in allow list and registered
* reworded the descriptions in DataCenterConfig
* some minor gui changes
  - gettext fixes
  - renaming pmxTag to pveTag
  - refactored the dc edit windows out into their own files
* omitted already applied widget-toolkit patches

changes from v9:
* implemented changes required by wolfgang
  - fixed some c code behaviour
  - refactored the permission check into guest-common
* changed a bit how the permission check worked:
  - get_allowed_tags now takes a bool (privileged_user) and a closure
    for checking the vm access. with this we can avoid a
    cluster <-> access-control cyclic dependency
  - refactored some of the internal code of the permission check
    (see patch for details)
  - the forbidden tags are now in quotes in the error
* added an optional 'ordering' option into the '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 option for tag-style
  datacenter.cfg: add tag rights control to the datacenter config
  datacenter.cfg: add 'ordering' to 'tag-style' config

 data/PVE/Cluster.pm          |  27 +++++
 data/PVE/DataCenterConfig.pm | 109 ++++++++++++++++++
 data/src/cfs-ipc-ops.h       |   2 +
 data/src/server.c            |  63 +++++++++++
 data/src/status.c            | 207 +++++++++++++++++++++++++----------
 data/src/status.h            |   3 +
 6 files changed, 353 insertions(+), 58 deletions(-)

pve-guest-common:

Dominik Csapak (1):
  GuestHelpers: add tag related helpers

 debian/control          |  3 +-
 src/PVE/GuestHelpers.pm | 99 ++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 100 insertions(+), 2 deletions(-)

qemu-server:

Dominik Csapak (1):
  api: update: check for tags permissions with 'assert_tag_permissions'

 PVE/API2/Qemu.pm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

pve-container:

Dominik Csapak (1):
  check_ct_modify_config_perm: check for tags permissions with
    'assert_tag_permissions'

 src/PVE/LXC.pm | 4 ++++
 1 file changed, 4 insertions(+)

pve-manager:

Dominik Csapak (13):
  api: /cluster/resources: add tags to returned properties
  api: allow all users to (partially) read datacenter.cfg
  ui: save ui options from /cluster/options instead of version
  ui: parse and save tag infos from /cluster/options
  ui: add form/TagColorGrid
  ui: add PVE.form.ListField
  ui: dc/OptionView: add editors for tag settings
  ui: add form/Tag
  ui: add form/TagEdit.js
  ui: {lxc,qemu}/Config: show Tags and make them editable
  ui: tree/ResourceTree: show Tags in tree
  ui: add tags to ResourceGrid and GlobalSearchField
  ui: implement tag ordering from datacenter.cfg

 PVE/API2.pm                            |   3 +-
 PVE/API2/Cluster.pm                    |  33 ++-
 www/css/ext6-pve.css                   |  57 ++++
 www/manager6/Makefile                  |   6 +
 www/manager6/Utils.js                  | 104 ++++++-
 www/manager6/Workspace.js              |   2 +
 www/manager6/data/ResourceStore.js     |   7 +
 www/manager6/dc/OptionView.js          | 139 +++++++++-
 www/manager6/dc/RegisteredTagsEdit.js  |  70 +++++
 www/manager6/dc/UserTagAccessEdit.js   |  90 +++++++
 www/manager6/form/GlobalSearchField.js |  20 +-
 www/manager6/form/ListField.js         | 165 ++++++++++++
 www/manager6/form/Tag.js               | 232 ++++++++++++++++
 www/manager6/form/TagColorGrid.js      | 357 +++++++++++++++++++++++++
 www/manager6/form/TagEdit.js           | 336 +++++++++++++++++++++++
 www/manager6/grid/ResourceGrid.js      |   1 +
 www/manager6/lxc/Config.js             |  36 ++-
 www/manager6/qemu/Config.js            |  35 ++-
 www/manager6/tree/ResourceTree.js      |  10 +-
 19 files changed, 1682 insertions(+), 21 deletions(-)
 create mode 100644 www/manager6/dc/RegisteredTagsEdit.js
 create mode 100644 www/manager6/dc/UserTagAccessEdit.js
 create mode 100644 www/manager6/form/ListField.js
 create mode 100644 www/manager6/form/Tag.js
 create mode 100644 www/manager6/form/TagColorGrid.js
 create mode 100644 www/manager6/form/TagEdit.js

-- 
2.30.2





             reply	other threads:[~2022-11-16 15:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 15:47 Dominik Csapak [this message]
2022-11-16 15:47 ` [pve-devel] [PATCH cluster v11 1/5] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method Dominik Csapak
2022-11-16 15:47 ` [pve-devel] [PATCH cluster v11 2/5] Cluster: add get_guest_config_properties Dominik Csapak
2022-11-16 15:47 ` [pve-devel] [PATCH cluster v11 3/5] datacenter.cfg: add option for tag-style Dominik Csapak
2022-11-16 15:47 ` [pve-devel] [PATCH cluster v11 4/5] datacenter.cfg: add tag rights control to the datacenter config Dominik Csapak
2022-11-16 15:47 ` [pve-devel] [PATCH cluster v11 5/5] datacenter.cfg: add 'ordering' to 'tag-style' config Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH guest-common v11 1/1] GuestHelpers: add tag related helpers Dominik Csapak
2022-11-17 12:12   ` [pve-devel] applied: " Thomas Lamprecht
2022-11-16 15:48 ` [pve-devel] [PATCH qemu-server v11 1/1] api: update: check for tags permissions with 'assert_tag_permissions' Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH container v11 1/1] check_ct_modify_config_perm: " Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 01/13] api: /cluster/resources: add tags to returned properties Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 02/13] api: allow all users to (partially) read datacenter.cfg Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 03/13] ui: save ui options from /cluster/options instead of version Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 04/13] ui: parse and save tag infos from /cluster/options Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 05/13] ui: add form/TagColorGrid Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 06/13] ui: add PVE.form.ListField Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 07/13] ui: dc/OptionView: add editors for tag settings Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 08/13] ui: add form/Tag Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 09/13] ui: add form/TagEdit.js Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 10/13] ui: {lxc, qemu}/Config: show Tags and make them editable Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 11/13] ui: tree/ResourceTree: show Tags in tree Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 12/13] ui: add tags to ResourceGrid and GlobalSearchField Dominik Csapak
2022-11-16 15:48 ` [pve-devel] [PATCH manager v11 13/13] ui: implement tag ordering from datacenter.cfg Dominik Csapak
2022-11-17 10:18 ` [pve-devel] partially-applied: [PATCH cluster/guest-common/qemu-server/ct/manager v11] add tags to ui Thomas Lamprecht
2022-11-17 17:22 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221116154815.358385-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal