mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed SessionsAsTable on Analysis page
This commit is contained in:
parent
9b5cdcc9a1
commit
8dd54015f6
@ -6,13 +6,16 @@ package main.java.com.djrapitops.plan.utilities.html.structure;
|
|||||||
|
|
||||||
import com.djrapitops.plugin.utilities.Verify;
|
import com.djrapitops.plugin.utilities.Verify;
|
||||||
import main.java.com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
|
import main.java.com.djrapitops.plan.Settings;
|
||||||
import main.java.com.djrapitops.plan.data.Session;
|
import main.java.com.djrapitops.plan.data.Session;
|
||||||
import main.java.com.djrapitops.plan.data.time.WorldTimes;
|
import main.java.com.djrapitops.plan.data.time.WorldTimes;
|
||||||
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
||||||
import main.java.com.djrapitops.plan.utilities.analysis.AnalysisUtils;
|
import main.java.com.djrapitops.plan.utilities.analysis.AnalysisUtils;
|
||||||
|
import main.java.com.djrapitops.plan.utilities.html.Html;
|
||||||
import main.java.com.djrapitops.plan.utilities.html.HtmlStructure;
|
import main.java.com.djrapitops.plan.utilities.html.HtmlStructure;
|
||||||
import main.java.com.djrapitops.plan.utilities.html.graphs.WorldPieCreator;
|
import main.java.com.djrapitops.plan.utilities.html.graphs.WorldPieCreator;
|
||||||
import main.java.com.djrapitops.plan.utilities.html.tables.KillsTableCreator;
|
import main.java.com.djrapitops.plan.utilities.html.tables.KillsTableCreator;
|
||||||
|
import main.java.com.djrapitops.plan.utilities.html.tables.SessionsTableCreator;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -30,10 +33,6 @@ public class SessionTabStructureCreator {
|
|||||||
|
|
||||||
Map<Integer, UUID> uuidsByID = generateIDtoUUIDMap(sessions);
|
Map<Integer, UUID> uuidsByID = generateIDtoUUIDMap(sessions);
|
||||||
|
|
||||||
// if (Settings.DISPLAY_SESSIONS_AS_TABLE.isTrue()) {
|
|
||||||
// return new String[]{Html.TABLE_SESSIONS.parse("", "", "", SessionsTableCreator.createTable(uuidsByID, allSessions)[0]), ""};
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (Verify.isEmpty(allSessions)) {
|
if (Verify.isEmpty(allSessions)) {
|
||||||
return new String[]{"<div class=\"body\">" +
|
return new String[]{"<div class=\"body\">" +
|
||||||
"<h3>No Sessions</h3>" +
|
"<h3>No Sessions</h3>" +
|
||||||
@ -172,6 +171,10 @@ public class SessionTabStructureCreator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String[] creteStructure(Map<UUID, List<Session>> sessions, List<Session> allSessions) {
|
public static String[] creteStructure(Map<UUID, List<Session>> sessions, List<Session> allSessions) {
|
||||||
|
if (Settings.DISPLAY_SESSIONS_AS_TABLE.isTrue()) {
|
||||||
|
return new String[]{Html.TABLE_SESSIONS.parse("", "", "", SessionsTableCreator.createTable(sessions, allSessions)[0]), ""};
|
||||||
|
}
|
||||||
|
|
||||||
Map<UUID, Map<String, List<Session>>> map = new HashMap<>();
|
Map<UUID, Map<String, List<Session>>> map = new HashMap<>();
|
||||||
|
|
||||||
for (Map.Entry<UUID, List<Session>> entry : sessions.entrySet()) {
|
for (Map.Entry<UUID, List<Session>> entry : sessions.entrySet()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user