mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-24 08:26:01 +00:00
ui: firewall grid: fix rendering comment, only show tooltip when truncated
avoid showing "undefined" if there's no comment, renderer must not return null or undefined directly, it will converted to string as is, so always fallback to '' empty string Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1290a65d90
commit
2d1ed7d3cc
@ -763,10 +763,12 @@ Ext.define('PVE.FirewallRules', {
|
||||
dataIndex: 'comment',
|
||||
flex: 6,
|
||||
renderer: function(value, metaData, record) {
|
||||
let comment = render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record);
|
||||
return `<span data-qtip="${comment}">${comment}</span>`;
|
||||
},
|
||||
|
||||
let comment = render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record) || '';
|
||||
if (comment.length * 12 > metaData.column.cellWidth) {
|
||||
comment = `<span data-qtip="${comment}">${comment}</span>`;
|
||||
}
|
||||
return comment;
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user