net/wireguard: widget, fix/improve colum public key overlapping latest handshake (#3349)

fixes public key overlapping latest handshake, moving the ellipsis to
css to allow full display and fix current overlap
This commit is contained in:
Victor Häggqvist
2023-06-28 10:24:57 +02:00
committed by GitHub
parent 92cbb2fd69
commit fff781bb2f
@@ -60,14 +60,12 @@ $enabled = ($config["OPNsense"]["wireguard"]["general"]["enabled"] === "1" ? tru
$(window).on("load", function() {
function wgGenerateRow(name, interface, peerName, publicKey, latestHandshake, status)
{
publicKeyShort = publicKey.slice(0, 19) + '...';
var tr = ''
+'<tr>'
+' <td>' + name + '</td>'
+' <td>' + interface + '</td>'
+' <td>' + peerName + '</td>'
+' <td title="' + publicKey + '">' + publicKeyShort + '</td>'
+' <td style="overflow: hidden; text-overflow: ellipsis;" title="' + publicKey + '">' + publicKey + '</td>'
+' <td>' + latestHandshake + '</td>'
+'</tr>';