mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-03 09:21:41 +01:00
Fixed some inconsistent variable names
This commit is contained in:
parent
618adadfd2
commit
405edf6979
@ -867,12 +867,12 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
jsonRequest("../v1/graph?type=playersOnline&server=${serverUUID}", function (data, error) {
|
jsonRequest("../v1/graph?type=playersOnline&server=${serverUUID}", function (json, error) {
|
||||||
if (data) {
|
if (json) {
|
||||||
var series = {
|
var series = {
|
||||||
playersOnline: {
|
playersOnline: {
|
||||||
name: s.name.playersOnline, type: s.type.areaSpline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.playersOnline, type: s.type.areaSpline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.playersOnline, color: v.colors.playersOnline, yAxis: 0
|
data: json.playersOnline, color: v.colors.playersOnline, yAxis: 0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
playersChart('playersOnlineChart', series.playersOnline, 2);
|
playersChart('playersOnlineChart', series.playersOnline, 2);
|
||||||
@ -881,15 +881,15 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
jsonRequest("../v1/graph?type=uniqueAndNew", function (data, error) {
|
jsonRequest("../v1/graph?type=uniqueAndNew", function (json, error) {
|
||||||
if (data) {
|
if (json) {
|
||||||
var uniquePlayers = {
|
var uniquePlayers = {
|
||||||
name: s.name.uniquePlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.uniquePlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.uniquePlayers, color: v.colors.playersOnline
|
data: json.uniquePlayers, color: v.colors.playersOnline
|
||||||
};
|
};
|
||||||
var newPlayers = {
|
var newPlayers = {
|
||||||
name: s.name.newPlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.newPlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.newPlayers, color: v.colors.newPlayers
|
data: json.newPlayers, color: v.colors.newPlayers
|
||||||
};
|
};
|
||||||
dayByDay('uniqueChart', [uniquePlayers, newPlayers]);
|
dayByDay('uniqueChart', [uniquePlayers, newPlayers]);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
@ -898,7 +898,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
jsonRequest("../v1/graph?type=serverPie", function (json, error) {
|
jsonRequest("../v1/graph?type=serverPie", function (json, error) {
|
||||||
if (data) {
|
if (json) {
|
||||||
serverPieSeries = {
|
serverPieSeries = {
|
||||||
name: 'Server Playtime',
|
name: 'Server Playtime',
|
||||||
colorByPoint: true,
|
colorByPoint: true,
|
||||||
|
@ -1390,53 +1390,53 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
jsonRequest("../v1/graph?type=performance&server=${serverName}", function (data, error) {
|
jsonRequest("../v1/graph?type=performance&server=${serverName}", function (json, error) {
|
||||||
if (data) {
|
if (json) {
|
||||||
var series = {
|
var series = {
|
||||||
playersOnline: {
|
playersOnline: {
|
||||||
name: s.name.playersOnline, type: s.type.areaSpline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.playersOnline, type: s.type.areaSpline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.playersOnline, color: v.colors.playersOnline, yAxis: 0
|
data: json.playersOnline, color: v.colors.playersOnline, yAxis: 0
|
||||||
},
|
},
|
||||||
tps: {
|
tps: {
|
||||||
name: s.name.tps, type: s.type.spline, color: v.colors.tpsHigh,
|
name: s.name.tps, type: s.type.spline, color: v.colors.tpsHigh,
|
||||||
zones: s.zones.tps, tooltip: s.tooltip.twoDecimals, data: data.tps,
|
zones: s.zones.tps, tooltip: s.tooltip.twoDecimals, data: json.tps,
|
||||||
yAxis: 1
|
yAxis: 1
|
||||||
},
|
},
|
||||||
cpu: {
|
cpu: {
|
||||||
name: s.name.cpu, type: s.type.spline, tooltip: s.tooltip.twoDecimals,
|
name: s.name.cpu, type: s.type.spline, tooltip: s.tooltip.twoDecimals,
|
||||||
data: data.cpu, color: v.colors.cpu, yAxis: 2
|
data: json.cpu, color: v.colors.cpu, yAxis: 2
|
||||||
},
|
},
|
||||||
cpu_alt: {
|
cpu_alt: {
|
||||||
name: s.name.cpu, type: s.type.spline, tooltip: s.tooltip.twoDecimals,
|
name: s.name.cpu, type: s.type.spline, tooltip: s.tooltip.twoDecimals,
|
||||||
data: data.cpu, color: v.colors.cpu, yAxis: 1
|
data: json.cpu, color: v.colors.cpu, yAxis: 1
|
||||||
},
|
},
|
||||||
ram: {
|
ram: {
|
||||||
name: s.name.ram, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.ram, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.ram, color: v.colors.ram, yAxis: 3
|
data: json.ram, color: v.colors.ram, yAxis: 3
|
||||||
},
|
},
|
||||||
ram_alt: {
|
ram_alt: {
|
||||||
name: s.name.ram, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.ram, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.ram, color: v.colors.ram, yAxis: 2
|
data: json.ram, color: v.colors.ram, yAxis: 2
|
||||||
},
|
},
|
||||||
entities: {
|
entities: {
|
||||||
name: s.name.entities, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.entities, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.entities, color: v.colors.entities, yAxis: 4
|
data: json.entities, color: v.colors.entities, yAxis: 4
|
||||||
},
|
},
|
||||||
entities_alt: {
|
entities_alt: {
|
||||||
name: s.name.entities, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.entities, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.entities, color: v.colors.entities, yAxis: 1
|
data: json.entities, color: v.colors.entities, yAxis: 1
|
||||||
},
|
},
|
||||||
chunks: {
|
chunks: {
|
||||||
name: s.name.chunks, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.chunks, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.chunks, color: v.colors.chunks, yAxis: 5
|
data: json.chunks, color: v.colors.chunks, yAxis: 5
|
||||||
},
|
},
|
||||||
chunks_alt: {
|
chunks_alt: {
|
||||||
name: s.name.chunks, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.chunks, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.chunks, color: v.colors.chunks, yAxis: 2
|
data: json.chunks, color: v.colors.chunks, yAxis: 2
|
||||||
},
|
},
|
||||||
disk: {
|
disk: {
|
||||||
name: s.name.disk, type: s.type.spline, color: v.colors.tpsHigh,
|
name: s.name.disk, type: s.type.spline, color: v.colors.tpsHigh,
|
||||||
zones: s.zones.disk, tooltip: s.tooltip.zeroDecimals, data: data.disk
|
zones: s.zones.disk, tooltip: s.tooltip.zeroDecimals, data: json.disk
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
playersChart('playersOnlineChart', series.playersOnline, 2);
|
playersChart('playersOnlineChart', series.playersOnline, 2);
|
||||||
@ -1535,15 +1535,15 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
jsonRequest("../v1/graph?type=uniqueAndNew&server=${serverName}", function (data, error) {
|
jsonRequest("../v1/graph?type=uniqueAndNew&server=${serverName}", function (json, error) {
|
||||||
if (data) {
|
if (json) {
|
||||||
var uniquePlayers = {
|
var uniquePlayers = {
|
||||||
name: s.name.uniquePlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.uniquePlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.uniquePlayers, color: v.colors.playersOnline
|
data: json.uniquePlayers, color: v.colors.playersOnline
|
||||||
};
|
};
|
||||||
var newPlayers = {
|
var newPlayers = {
|
||||||
name: s.name.newPlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
name: s.name.newPlayers, type: s.type.spline, tooltip: s.tooltip.zeroDecimals,
|
||||||
data: data.newPlayers, color: v.colors.newPlayers
|
data: json.newPlayers, color: v.colors.newPlayers
|
||||||
};
|
};
|
||||||
dayByDay('uniqueChart', [uniquePlayers, newPlayers]);
|
dayByDay('uniqueChart', [uniquePlayers, newPlayers]);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
@ -1578,12 +1578,12 @@
|
|||||||
|
|
||||||
setLoadingText('Sorting players table..');
|
setLoadingText('Sorting players table..');
|
||||||
|
|
||||||
jsonRequest("../v1/players?server=${serverName}", function (playersTableJson, error) {
|
jsonRequest("../v1/players?server=${serverName}", function (json, error) {
|
||||||
if (playersTableJson) {
|
if (json) {
|
||||||
$('.player-table').DataTable({
|
$('.player-table').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
columns: playersTableJson.columns,
|
columns: json.columns,
|
||||||
data: playersTableJson.data,
|
data: json.data,
|
||||||
order: [[5, "desc"]]
|
order: [[5, "desc"]]
|
||||||
})
|
})
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user