Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 data/PVE/DataCenterConfig.pm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/data/PVE/DataCenterConfig.pm b/data/PVE/DataCenterConfig.pm
index 6c0fa5b..c21dbb7 100644
--- a/data/PVE/DataCenterConfig.pm
+++ b/data/PVE/DataCenterConfig.pm
@@ -106,6 +106,10 @@ sub pve_verify_mac_prefix {
     return $mac_prefix;
 }
 
+my $TAG_RE = '[a-zA-Z0-9_][a-zA-Z0-9_\-\+\.]*';
+my $COLOR_RE = '[0-9a-fA-F]{6}';
+my $OVERRIDE_RE = "(?:${TAG_RE}=${COLOR_RE}(?:\:${COLOR_RE})?)";
+
 my $datacenter_schema = {
     type => "object",
     additionalProperties => 0,
@@ -222,6 +226,20 @@ my $datacenter_schema = {
            maxLength => 64 * 1024,
            optional => 1,
        },
+       'tag-tree-style' => {
+           optional => 1,
+           type => 'string',
+           enum => ['full', 'circle', 'dense', 'none'],
+           default => 'circle',
+           description => "Tag style in tree.",
+       },
+       'tag-colors' => {
+           optional => 1,
+           type => 'string',
+           pattern => "${OVERRIDE_RE}(?:\,$OVERRIDE_RE)*",
+           typetext => '<tag>=<hex-color>[:<hex-color-for-text>][,<tag>=...]',
+           description => "Manual color mapping for tags (comma separated).",
+       },
     },
 };
 
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to