Expose both name and IP of client

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-06-06 18:27:55 -04:00
parent 6f93f89e59
commit 357da1d15a
2 changed files with 6 additions and 2 deletions

View File

@@ -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);

View File

@@ -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 = [];