public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix #6815: ui: resource tree: update tag colors properly
@ 2025-10-10  7:27 Dominik Csapak
  2025-10-10  7:30 ` Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-10-10  7:27 UTC (permalink / raw)
  To: pve-devel

In commit:
 e19de81f (ui: resource tree: fix change detection)
the change detection for resource tree nodes was fixed so that it did
not update on every refresh anymore.

This now also means that when the ui options are loaded (which contains
the tag color overrides) we now have to correctly update nodes which
contains tags, otherwise the standard colors will be shown.

There is already an event handler for the 'loadedUiOptions', so simply
adapt it to also update the tree nodes that contains tags.

Fixes: e19de81f (ui: resource tree: fix change detection)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/tree/ResourceTree.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
index 315976e0..e83ccfc8 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -605,7 +605,7 @@ Ext.define('PVE.tree.ResourceTree', {
         me.mon(Ext.GlobalEvents, 'loadedUiOptions', () => {
             me.store.getRootNode().cascadeBy({
                 before: function (node) {
-                    if (node.data.groupbyid) {
+                    if (node.data.groupbyid || node.data.tags) {
                         node.beginEdit();
                         let info = node.data;
                         me.setIconCls(info);
-- 
2.47.3



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pve-devel] [PATCH manager] fix #6815: ui: resource tree: update tag colors properly
  2025-10-10  7:27 [pve-devel] [PATCH manager] fix #6815: ui: resource tree: update tag colors properly Dominik Csapak
@ 2025-10-10  7:30 ` Dominik Csapak
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2025-10-10  7:30 UTC (permalink / raw)
  To: pve-devel

forgot to write, this should be backported to stable-8 too, should be
cleanly cherry-pickable

On 10/10/25 9:28 AM, Dominik Csapak wrote:
> In commit:
>   e19de81f (ui: resource tree: fix change detection)
> the change detection for resource tree nodes was fixed so that it did
> not update on every refresh anymore.
> 
> This now also means that when the ui options are loaded (which contains
> the tag color overrides) we now have to correctly update nodes which
> contains tags, otherwise the standard colors will be shown.
> 
> There is already an event handler for the 'loadedUiOptions', so simply
> adapt it to also update the tree nodes that contains tags.
> 
> Fixes: e19de81f (ui: resource tree: fix change detection)
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>   www/manager6/tree/ResourceTree.js | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
> index 315976e0..e83ccfc8 100644
> --- a/www/manager6/tree/ResourceTree.js
> +++ b/www/manager6/tree/ResourceTree.js
> @@ -605,7 +605,7 @@ Ext.define('PVE.tree.ResourceTree', {
>           me.mon(Ext.GlobalEvents, 'loadedUiOptions', () => {
>               me.store.getRootNode().cascadeBy({
>                   before: function (node) {
> -                    if (node.data.groupbyid) {
> +                    if (node.data.groupbyid || node.data.tags) {
>                           node.beginEdit();
>                           let info = node.data;
>                           me.setIconCls(info);



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-10  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-10  7:27 [pve-devel] [PATCH manager] fix #6815: ui: resource tree: update tag colors properly Dominik Csapak
2025-10-10  7:30 ` Dominik Csapak

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