[pve-devel] [PATCH cluster/widget-toolkit/manager v4] add tags to ui
Dominik Csapak
d.csapak at proxmox.com
Wed Mar 23 11:34:33 CET 2022
this series is a continuation of my previous attempt in 2019.
note that this requires my previous patch for pve-cluster that
introduces the 'get properties' pmxcfs message[0]
this is a bit "rough" on various points, but i wanted to send what i have
before i code myself into a hole i cannot easily get out of^^, namely:
* having gui config options in datacenter.cfg
(gui console is a precedence here, but maybe there is still a better place?)
also if /version is the right place to get it or if we should make another
dedicated api call for such things
* the datacenter tags=color regex (could refactor the tags regex out in
pve-common)
* the color editing grid in the gui:
this is very basic but usable. on short notice i did not really find
a better way to have that mapping from arbitrarily tags (but
selectable from existing ones) to color
* there is no drag&drop (like @thomas wished the last time), but with
the new inline editing it's maybe not necessary?
* no gui for the browser-settings yet:
since there is not much space left in the 'my settings' window, i'd
have to reorganize it, but did not come around to that yet, this can
ofc also be done at a later stage if we ignore browser set color
overrides for now
* the tree styling:
not sure if it makes sense at all to have multiple styles here, though
i always find such options nice. the 'dense' option i am a bit
conflicted myself, it provides a better experience when having many
tags, but you lose some contrast depending on the colors
* probably many more...
changes from v3:
* show the tags in the tree (with multiple styles)
* they are now inline editable instead of having a pop up with the editor
* able to override colors in datacenter cfg
* show a dropdown on editing with existing tags (from tree+overrides)
* show the tags in the global search grid (and make them searchable)
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
0: https://lists.proxmox.com/pipermail/pve-devel/2022-March/052174.html
pve-cluster:
Dominik Csapak (1):
datacenter.cfg: add option for tag-tree-style and tag-colors
data/PVE/DataCenterConfig.pm | 13 +++++++++++++
1 file changed, 13 insertions(+)
proxmox-widget-toolkit:
Dominik Csapak (1):
add tag related helpers
src/Utils.js | 35 +++++++++++++++++++++++++++++
src/css/ext6-pmx.css | 52 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+)
pve-manager:
Dominik Csapak (10):
api: /cluster/resources: add tags to returned properties
api: /version: add 'tag-colors' and 'tag-tree-style'
ui: parse and save tag color overrides from /version
ui: tree/ResourceTree: collect tags on update
ui: add form/TagColorGrid
ui: dc/OptionView: add editors for tag settings
ui: add form/Tag
ui: {lxc,qemu}/Config: show Tags and make them editable
ui: tree/ResourceTree: show Tags in tree
ui: form/GlobalSearchField: display tags and allow to search for them
PVE/API2.pm | 12 +-
PVE/API2/Cluster.pm | 9 +-
www/manager6/Makefile | 2 +
www/manager6/Utils.js | 62 +++++++
www/manager6/Workspace.js | 13 ++
www/manager6/data/ResourceStore.js | 6 +
www/manager6/dc/OptionView.js | 43 ++++-
www/manager6/form/GlobalSearchField.js | 19 ++-
www/manager6/form/Tag.js | 207 +++++++++++++++++++++++
www/manager6/form/TagColorGrid.js | 218 +++++++++++++++++++++++++
www/manager6/lxc/Config.js | 72 +++++++-
www/manager6/qemu/Config.js | 70 +++++++-
www/manager6/tree/ResourceTree.js | 20 ++-
13 files changed, 735 insertions(+), 18 deletions(-)
create mode 100644 www/manager6/form/Tag.js
create mode 100644 www/manager6/form/TagColorGrid.js
--
2.30.2
More information about the pve-devel
mailing list