mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Add support for multiple hostnames per client (hardware address).
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -108,8 +108,26 @@ $(document).ready(function () {
|
||||
// Set hostname to "unknown" if not available
|
||||
if (!data.name || data.name.length === 0) {
|
||||
$("td:eq(3)", row).html("<em>unknown</em>");
|
||||
} else {
|
||||
var names = [];
|
||||
var maxiter = Math.min(data.name.length, MAXIPDISPLAY);
|
||||
for (var index = 0; index < maxiter; index++) {
|
||||
var name = data.name[index];
|
||||
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("...");
|
||||
}
|
||||
$("td:eq(3)", row).html(names.join("<br>"));
|
||||
$("td:eq(3)", row).hover(function () {
|
||||
this.title = data.name.join("\n");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Set number of queries to localized string (add thousand separators)
|
||||
$("td:eq(6)", row).html(data.numQueries.toLocaleString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user