]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: FirewallRules: Add tooltip to comments
authorAaron Lauterer <a.lauterer@proxmox.com>
Mon, 22 Feb 2021 10:16:26 +0000 (11:16 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Feb 2021 12:46:31 +0000 (13:46 +0100)
The comment columns might not be wide enough for longer comments. Since
it is the most right columns, it can be tricky to grab the right pixel
to drag it wider.

A tooltip that shows up on hover should be okay.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
www/manager6/grid/FirewallRules.js

index 5a2241a045178b816bbc66c966d33831e2487ced..f7f304b88f760fe1c32d33d244005ee37960b60f 100644 (file)
@@ -763,8 +763,10 @@ Ext.define('PVE.FirewallRules', {
                dataIndex: 'comment',
                flex: 6,
                renderer: function(value, metaData, record) {
-                   return render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record);
-               },
+                   let comment = render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record);
+                   return `<span data-qtip="${comment}">${comment}</span>`;
+},
+
            },
        );