]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: resource tree: fix extra space inconsistency in some node elements
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 23 Nov 2023 08:25:40 +0000 (09:25 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 23 Nov 2023 08:36:57 +0000 (09:36 +0100)
When a node element was updated, it was put through the 'setText'
method which accidentally added a space before it's name.

Fix this by putting the space into the status variable.

Without this patch one could observe a vertical misalignment when some
nodes had guests on them but others had none.

Fixes: 2f414c50 ("ui: resource tree: limit tooltip to icon and text")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/tree/ResourceTree.js

index acfa545aeac3e74ea46954f98ee995c71c493e55..7b2934ae9d4ac4ea9a614e257fd3c67bf76d4bb9 100644 (file)
@@ -122,7 +122,7 @@ Ext.define('PVE.tree.ResourceTree', {
                status = '<div class="usage-wrapper">';
                status += `<div class="usage-negative" style="height: ${remainingHeight}%"></div>`;
                status += `<div class="usage" style="height: ${barHeight}%"></div>`;
-               status += '</div>';
+               status += '</div> ';
            }
        }
        if (Ext.isNumeric(info.vmid) && info.vmid > 0) {
@@ -130,7 +130,7 @@ Ext.define('PVE.tree.ResourceTree', {
                info.text = `${info.name} (${String(info.vmid)})`;
            }
        }
-       info.text = `<span>${status} ${info.text}</span>`;
+       info.text = `<span>${status}${info.text}</span>`;
        info.text += PVE.Utils.renderTags(info.tags, PVE.UIOptions.tagOverrides);
     },