From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 6C2ACBB61 for ; Fri, 8 Apr 2022 09:45:37 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6A474BDB2 for ; Fri, 8 Apr 2022 09:45:37 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 11C8DBCD9 for ; Fri, 8 Apr 2022 09:45:32 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DCA3145A14 for ; Fri, 8 Apr 2022 09:45:31 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 8 Apr 2022 09:45:15 +0200 Message-Id: <20220408074530.1212056-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH cluster/widget-toolkit/manager v5] add tags to ui X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2022 07:45:37 -0000 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 * when editing a tag, a list of existing tags will be shown * by default, the color is (consistently) autogenerated based on the text * that color can be overriden 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 styles available for the tree (see [0]) changes from v4: * optimized the global taglist/tagoverrides so that they don't have to be copied for everytag, but only once on update * made the tags less round by default * to edit, one must first enter 'edit' mode by clicking on an edit icon and apply by clicking on an apply button (this way one can copy&paste the tags without starting an edit, and can edit multiple tags with only one api call) * improved the 'dense' style a bit (wider + spacing) * includes all necessary cluster patches 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://imgur.com/a/0t2fvud pve-cluster: Dominik Csapak (3): add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method Cluster: add get_guest_config_properties datacenter.cfg: add option for tag-tree-style and tag-colors data/PVE/Cluster.pm | 27 ++++++ data/PVE/DataCenterConfig.pm | 18 ++++ data/src/cfs-ipc-ops.h | 2 + data/src/server.c | 62 +++++++++++++ data/src/status.c | 174 ++++++++++++++++++++++++----------- data/src/status.h | 3 + 6 files changed, 230 insertions(+), 56 deletions(-) proxmox-widget-toolkit: Dominik Csapak (1): add tag related helpers src/Utils.js | 70 ++++++++++++++++++++++++++++++++++++++++++++ src/css/ext6-pmx.css | 45 ++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) pve-manager: Dominik Csapak (11): 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: add form/TagEdit.js 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/css/ext6-pve.css | 5 + www/manager6/Makefile | 3 + www/manager6/Utils.js | 68 ++++++ www/manager6/Workspace.js | 13 ++ www/manager6/data/ResourceStore.js | 6 + www/manager6/dc/OptionView.js | 43 +++- www/manager6/form/GlobalSearchField.js | 20 +- www/manager6/form/Tag.js | 254 ++++++++++++++++++++ www/manager6/form/TagColorGrid.js | 309 +++++++++++++++++++++++++ www/manager6/form/TagEdit.js | 131 +++++++++++ www/manager6/lxc/Config.js | 36 ++- www/manager6/qemu/Config.js | 35 ++- www/manager6/tree/ResourceTree.js | 20 +- 15 files changed, 946 insertions(+), 18 deletions(-) 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