[pve-devel] [PATCH manager] ui: resource tree: fix rendering of guest text when sorted by name
Dominik Csapak
d.csapak at proxmox.com
Mon Nov 17 14:18:50 CET 2025
In a recent commit, we changed how we render the text for element in the
resource tree, namely by not overwriting the original data in the store.
During that code move & change, a bug slipped in, where we correctly
detected that we're sorting by name and set the text to the correct
format, but ultimately discarded that value and overwrote it with the
original one from the store.
Fix this by first extracting the original text from the record, and the
use the text like we did the record field before
This was reported in the forum:
https://forum.proxmox.com/threads/176021/
Fixes: 83783c3b (ui: resource tree: prevent overwriting of 'text' property)
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
i hope this is the last fix i have to do for the tree rendering in a
long time ;)
www/manager6/tree/ResourceTree.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
index 770f7555..29e098d8 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -54,7 +54,7 @@ Ext.define('PVE.tree.ResourceTree', {
renderer: function (val, meta, rec) {
let info = rec.data;
- let text = '';
+ let text = info.text;
let status = '';
if (info.type === 'storage') {
let usage = info.disk / info.maxdisk;
@@ -72,7 +72,7 @@ Ext.define('PVE.tree.ResourceTree', {
text = `${info.name} (${String(info.vmid)})`;
}
}
- text = `<span>${status}${info.text}</span>`;
+ text = `<span>${status}${text}</span>`;
text += PVE.Utils.renderTags(info.tags, PVE.UIOptions.tagOverrides);
return (info.renderedText = text);
},
--
2.47.3
More information about the pve-devel
mailing list