Fix a minor bug with api.php?getClientNames when hostnames are present more than once on the local network (maybe once IPv6, once IPv4)

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-05-28 17:42:11 +02:00
parent 54191558af
commit b2743ed245
2 changed files with 3 additions and 10 deletions

View File

@@ -386,12 +386,7 @@ function updateClientsOverTime() {
for (key in data.clients)
{
if (!{}.hasOwnProperty.call(data.clients, key)) continue;
if(key.indexOf("|") > -1)
{
var idx = key.indexOf("|");
key = key.substr(0, idx);
}
labels.push(key);
labels.push(data.clients[key]);
}
// Get colors from AdminLTE
var colors = [];