Use client address if name is empty

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-06-07 19:03:39 +02:00
parent 357da1d15a
commit 2aef235040

View File

@@ -386,7 +386,16 @@ function updateClientsOverTime() {
for (key in data.clients)
{
if (!{}.hasOwnProperty.call(data.clients, key)) continue;
labels.push(data.clients[key].name);
var clientname;
if(data.clients[key].name.length > 0)
{
clientname = data.clients[key].name;
}
else
{
clientname = data.clients[key].ip;
}
labels.push(clientname);
}
// Get colors from AdminLTE
var colors = [];