[pve-devel] [PATCH qemu-server/container/toolkit/manager v3] fix #1934: add tags to guests

Dominik Csapak d.csapak at proxmox.com
Thu Oct 31 13:36:24 CET 2019


this series lets users add tags to guest configs
these do not have any concrete meaning but are intended to be used
by management software such as config management systems

this is the basic implementation of this feature, in the next step
i want to do:
* get the tags in the /cluster/resources api
  this way we could show it in the gui, but more important, we can
  give the users a list of available tags to choose from in the selector
* maybe make the colors customizable, e.g. in the datacenter.cfg
  where an admin could give specific colors to a certain tag
  for instance:
     tagcolors: production=255,255,0,1
  in rgba values, we could query that and use it in our 'hash'
  function if the string exists in the custom color map

changes from v2:
* rebase on master (drop applied patch, merge with lxc pending changes)
* move utilities to widget-toolkit
* prefix css classes
* remove tags from options and add edit button to the tags directly
* show 'no tags' when no tags are defined
* improve statusTxt style

changes from v1:
* slightly different format (use [a-z...] instead of \w)
* add comment in JSONSchema
* better commit message
* add the tags to the status api call of guests (for gui)
* show the tags in the gui
* make the tags editable in the gui

qemu-server:

Dominik Csapak (1):
  add 'tags' option

 PVE/API2/Qemu.pm  |  1 +
 PVE/QemuServer.pm | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

pve-container:

Dominik Csapak (1):
  add 'tags' option

 src/PVE/LXC.pm        | 6 ++++++
 src/PVE/LXC/Config.pm | 5 +++++
 2 files changed, 11 insertions(+)

proxmox-widget-toolkit:

Dominik Csapak (1):
  add tag related helpers

 Utils.js         | 35 ++++++++++++++++++++++++++++++++++-
 css/ext6-pmx.css | 13 +++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)

pve-manager:

Dominik Csapak (4):
  gui: add TagSelector
  gui: add tagEditBtn
  gui: add tags to guest status line
  gui: improve textitem style in qemu/lxc toolbar

 www/css/ext6-pve.css             |  17 +++++
 www/manager6/Makefile            |   2 +
 www/manager6/button/TagEdit.js   |  34 +++++++++
 www/manager6/form/TagSelector.js | 117 +++++++++++++++++++++++++++++++
 www/manager6/lxc/Config.js       |  25 ++++++-
 www/manager6/qemu/Config.js      |  26 ++++++-
 6 files changed, 215 insertions(+), 6 deletions(-)
 create mode 100644 www/manager6/button/TagEdit.js
 create mode 100644 www/manager6/form/TagSelector.js

-- 
2.20.1





More information about the pve-devel mailing list