When nesting pools is enabled for the tree, don't show the parent pools
in the name, so instead of:

- foo
  - foo/bar
    - foo/bar/baz
- bar
- baz

render:
- foo
  - bar
    - baz
- bar
- baz

Signed-off-by: Dominik Csapak <[email protected]>
---
 www/manager6/tree/ResourceTree.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/tree/ResourceTree.js 
b/www/manager6/tree/ResourceTree.js
index 99b33670..6ea28919 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -79,6 +79,10 @@ Ext.define('PVE.tree.ResourceTree', {
                     text += ` (${PVE.ClusterName})`;
                 }
 
+                if (info.type === 'pool' && 
PVE.UIOptions.getTreeSortingValue('nest-pools')) {
+                    text = info.pool.split('/').pop();
+                }
+
                 return (info.renderedText = text);
             },
         },
-- 
2.47.3



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to