mirror of
https://github.com/pi-hole/web.git
synced 2025-12-26 13:36:22 +00:00
Expose both name and IP of client
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -353,7 +353,11 @@ else
|
||||
$client_names = array();
|
||||
foreach($return as $line)
|
||||
{
|
||||
$client_names[] = $line;
|
||||
$tmp = explode(" ", $line);
|
||||
$client_names[] = array(
|
||||
"name" => $tmp[0],
|
||||
"ip" => $tmp[1]
|
||||
);
|
||||
}
|
||||
|
||||
$result = array('clients' => $client_names);
|
||||
|
||||
@@ -386,7 +386,7 @@ function updateClientsOverTime() {
|
||||
for (key in data.clients)
|
||||
{
|
||||
if (!{}.hasOwnProperty.call(data.clients, key)) continue;
|
||||
labels.push(data.clients[key]);
|
||||
labels.push(data.clients[key].name);
|
||||
}
|
||||
// Get colors from AdminLTE
|
||||
var colors = [];
|
||||
|
||||
Reference in New Issue
Block a user