[pve-devel] [PATCH manager 2/2] ui: FirewallRules: Add tooltip to comments

Aaron Lauterer a.lauterer at proxmox.com
Mon Feb 22 11:16:26 CET 2021


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 at proxmox.com>
---

As an additional patch as I realized that the comment column can be a
bit hard to use on smaller screens.

 www/manager6/grid/FirewallRules.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
index 5a2241a0..f7f304b8 100644
--- a/www/manager6/grid/FirewallRules.js
+++ b/www/manager6/grid/FirewallRules.js
@@ -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>`;
+},
+
 	    },
 	);
 
-- 
2.20.1






More information about the pve-devel mailing list