Show tooltip only when the number of items is greater than MAXIPDISPLAY
PHPStan / build (push) Has been cancelled
editorconfig-checker / editorconfig-checker (push) Has been cancelled
Check for merge conflicts / main (push) Has been cancelled
Lint / PHP-CS-Fixer (push) Has been cancelled

This commit is contained in:
RD WebDesign
2024-08-08 17:55:15 -03:00
parent 4562dd5b69
commit e81d49e8a5
+12 -8
View File
@@ -155,12 +155,6 @@ $(function () {
names.push('<a href="queries.php?client=' + name + '">' + name + "</a>");
}
if (data.name.length > MAXIPDISPLAY) {
// We hit the maximum above, add "..." to symbolize we would
// have more to show here
names.push("...");
}
maxiter = Math.min(data.ip.length, data.name.length);
var allnames = [];
for (index = 0; index < maxiter; index++) {
@@ -172,8 +166,16 @@ $(function () {
}
}
if (data.name.length > MAXIPDISPLAY) {
// We hit the maximum above, add "..." to symbolize we would
// have more to show here
names.push("...");
// Show the names on the title when there are more than MAXIPDISPLAY items
$("td:eq(3)", row).attr("title", allnames.join("\n"));
}
// Show the names in the first column
$("td:eq(3)", row).html(names.join("<br>"));
$("td:eq(3)", row).attr("title", allnames.join("\n"));
}
// Set number of queries to localized string (add thousand separators)
@@ -191,10 +193,12 @@ $(function () {
// We hit the maximum above, add "..." to symbolize we would
// have more to show here
ips.push("...");
// Show the IPs on the title when there are more than MAXIPDISPLAY items
$("td:eq(0)", row).attr("title", data.ip.join("\n"));
}
// Show the IPs in the first column
$("td:eq(0)", row).html(ips.join("<br>"));
$("td:eq(0)", row).attr("title", data.ip.join("\n"));
// MAC + Vendor field if available
if (data.macVendor && data.macVendor.length > 0) {