mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-08 17:37:34 +01:00
Fixed network page#tab-servers using month data
This caused some loading issues when network had a lot of servers
This commit is contained in:
parent
f4ff03bbc9
commit
e67f7193ef
@ -160,7 +160,6 @@ public class JSONFactory {
|
|||||||
Database db = dbSystem.getDatabase();
|
Database db = dbSystem.getDatabase();
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
long weekAgo = now - TimeUnit.DAYS.toMillis(7L);
|
long weekAgo = now - TimeUnit.DAYS.toMillis(7L);
|
||||||
long monthAgo = now - TimeUnit.DAYS.toMillis(30L);
|
|
||||||
|
|
||||||
Formatter<Long> year = formatters.yearLong();
|
Formatter<Long> year = formatters.yearLong();
|
||||||
Formatter<Double> decimals = formatters.decimals();
|
Formatter<Double> decimals = formatters.decimals();
|
||||||
@ -173,11 +172,11 @@ public class JSONFactory {
|
|||||||
.map(Server::getUuid).orElse(null);
|
.map(Server::getUuid).orElse(null);
|
||||||
|
|
||||||
Map<UUID, List<TPS>> tpsData = db.query(
|
Map<UUID, List<TPS>> tpsData = db.query(
|
||||||
TPSQueries.fetchTPSDataOfAllServersBut(monthAgo, now, proxyUUID)
|
TPSQueries.fetchTPSDataOfAllServersBut(weekAgo, now, proxyUUID)
|
||||||
);
|
);
|
||||||
Map<UUID, Integer> totalPlayerCounts = db.query(PlayerCountQueries.newPlayerCounts(0, now));
|
Map<UUID, Integer> totalPlayerCounts = db.query(PlayerCountQueries.newPlayerCounts(0, now));
|
||||||
Map<UUID, Integer> newPlayerCounts = db.query(PlayerCountQueries.newPlayerCounts(monthAgo, now));
|
Map<UUID, Integer> newPlayerCounts = db.query(PlayerCountQueries.newPlayerCounts(weekAgo, now));
|
||||||
Map<UUID, Integer> uniquePlayerCounts = db.query(PlayerCountQueries.uniquePlayerCounts(monthAgo, now));
|
Map<UUID, Integer> uniquePlayerCounts = db.query(PlayerCountQueries.uniquePlayerCounts(weekAgo, now));
|
||||||
|
|
||||||
List<Map<String, Object>> servers = new ArrayList<>();
|
List<Map<String, Object>> servers = new ArrayList<>();
|
||||||
serverInformation.entrySet()
|
serverInformation.entrySet()
|
||||||
|
Loading…
Reference in New Issue
Block a user