Fix incorrect IP references
This commit is contained in:
parent
3dc10f571f
commit
6d8ab212e0
1
app.js
1
app.js
@ -113,6 +113,7 @@ function handlePing(network, res, err) {
|
||||
// Send the update.
|
||||
server.io.sockets.emit('updateHistoryGraph', {
|
||||
ip: network.ip,
|
||||
name: network.name,
|
||||
players: (res ? res.players.online : 0),
|
||||
timestamp: timeMs
|
||||
});
|
||||
|
@ -308,14 +308,14 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
// If it's not in our display group, use the hidden group instead.
|
||||
var targetGraphData = displayedGraphData[rawData.ip] ? displayedGraphData : hiddenGraphData;
|
||||
var targetGraphData = displayedGraphData[rawData.name] ? displayedGraphData : hiddenGraphData;
|
||||
|
||||
trimOldPings(targetGraphData, graphDuration);
|
||||
|
||||
targetGraphData[rawData.ip].push([rawData.timestamp, rawData.players]);
|
||||
targetGraphData[rawData.name].push([rawData.timestamp, rawData.players]);
|
||||
|
||||
// Redraw if we need to.
|
||||
if (displayedGraphData[rawData.ip]) {
|
||||
if (displayedGraphData[rawData.name]) {
|
||||
historyPlot.setData(convertGraphData(displayedGraphData));
|
||||
historyPlot.setupGrid();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user