From 32fd2dc5aa45aa29029dd7319db77b452e09740c Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Wed, 22 Nov 2017 12:36:45 +0200 Subject: [PATCH] Session tab accodrdion --- .../java/com/djrapitops/plan/api/API.java | 4 +- .../plan/data/analysis/JoinInfoPart.java | 2 +- .../info/parsing/InspectPageParser.java | 21 +- .../djrapitops/plan/utilities/html/Html.java | 7 +- .../plan/utilities/html/HtmlStructure.java | 5 +- .../structure/SessionTabStructureCreator.java | 125 +- Plan/src/main/resources/web/player.html | 1 - Plan/src/main/resources/web/temp.html | 3900 +++++++++++++++++ .../utilities/html/HtmlStructureTest.java | 17 - 9 files changed, 3980 insertions(+), 102 deletions(-) create mode 100644 Plan/src/main/resources/web/temp.html diff --git a/Plan/src/main/java/com/djrapitops/plan/api/API.java b/Plan/src/main/java/com/djrapitops/plan/api/API.java index a20914018..a93fe8906 100644 --- a/Plan/src/main/java/com/djrapitops/plan/api/API.java +++ b/Plan/src/main/java/com/djrapitops/plan/api/API.java @@ -82,8 +82,8 @@ public class API { * @return {@code ../player/PlayerName} */ public String getPlayerInspectPageLink(String name) { - String link = "../player/" + name; - return link.replace(" ", "%20").replace(".", "%2E"); + String link = "../player/" + name.replace(" ", "%20").replace(".", "%2E"); + return link; } /** diff --git a/Plan/src/main/java/com/djrapitops/plan/data/analysis/JoinInfoPart.java b/Plan/src/main/java/com/djrapitops/plan/data/analysis/JoinInfoPart.java index d95dbaa8d..312557c60 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/analysis/JoinInfoPart.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/analysis/JoinInfoPart.java @@ -64,7 +64,7 @@ public class JoinInfoPart extends RawData { private void sessionTables() { String[] tables = SessionsTableCreator.createTable(this); String[] sessionContent = SessionTabStructureCreator.creteStructure(this); - addValue("contentSessions", sessionContent[0]); + addValue("accordionSessions", sessionContent[0]); addValue("sessionTabGraphViewFunctions", sessionContent[1]); addValue("tableBodySessions", tables[0]); addValue("tableBodyRecentLogins", tables[1]); diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java b/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java index d0ba6e4e6..c2a94c9c6 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java @@ -11,7 +11,6 @@ import main.java.com.djrapitops.plan.Settings; import main.java.com.djrapitops.plan.api.IPlan; import main.java.com.djrapitops.plan.api.exceptions.ParseException; import main.java.com.djrapitops.plan.data.Action; -import main.java.com.djrapitops.plan.data.GeoInfo; import main.java.com.djrapitops.plan.data.PlayerProfile; import main.java.com.djrapitops.plan.data.Session; import main.java.com.djrapitops.plan.data.time.WorldTimes; @@ -52,7 +51,6 @@ public class InspectPageParser extends PageParser { public String parse() throws ParseException { try { - // TODO Player is online parts Log.logDebug("Database", "Inspect Parse Fetch"); Benchmark.start("Inspect Parse, Fetch"); Database db = plugin.getDB(); @@ -70,7 +68,9 @@ public class InspectPageParser extends PageParser { String online = "Offline"; Optional activeSession = plugin.getInfoManager().getDataCache().getCachedSession(uuid); if (activeSession.isPresent()) { - profile.addActiveSession(activeSession.get()); + Session session = activeSession.get(); + session.setSessionID(Integer.MAX_VALUE); + profile.addActiveSession(session); online = serverNames.get(serverUuid); } activeSession.ifPresent(profile::addActiveSession); @@ -103,19 +103,6 @@ public class InspectPageParser extends PageParser { addValue("tableBodyNicknames", NicknameTableCreator.createTable(profile.getNicknames(), serverNames)); addValue("tableBodyIPs", IpTableCreator.createTable(profile.getGeoInformation())); - // TODO REMOVE after 4.1.0 - List nicknames = profile.getNicknames().values().stream() - .flatMap(Collection::stream) - .distinct() - .map(HtmlUtils::swapColorsToSpan) - .collect(Collectors.toList()); - List geoLocations = profile.getGeoInformation().stream() - .map(GeoInfo::getGeolocation) - .collect(Collectors.toList()); - addValue("nicknames", HtmlStructure.createDotList(nicknames.toArray(new String[nicknames.size()]))); - addValue("geolocations", HtmlStructure.createDotList(geoLocations.toArray(new String[geoLocations.size()]))); - // - Map> sessions = profile.getSessions(); Map> sessionsByServerName = sessions.entrySet().stream() .collect(Collectors.toMap(entry -> serverNames.get(entry.getKey()), Map.Entry::getValue)); @@ -125,7 +112,7 @@ public class InspectPageParser extends PageParser { .collect(Collectors.toList()); String[] sessionsTabContent = HtmlStructure.createSessionsTabContentInspectPage(sessionsByServerName, allSessions, uuid); - addValue("contentSessions", sessionsTabContent[0]); + addValue("accordionSessions", sessionsTabContent[0]); addValue("sessionTabGraphViewFunctions", sessionsTabContent[1]); addValue("contentServerOverview", HtmlStructure.createServerOverviewColumn(sessionsByServerName)); diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java b/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java index 017bdc4ee..01e05ec95 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java @@ -34,6 +34,7 @@ public enum Html { BUTTON("${1}"), BUTTON_CLASS("class=\"button\""), LINK("${1}"), + LINK_A("${1}"), LINK_TOOLTIP("${1}"), LINK_EXTERNAL("${1}"), LINK_CLASS("class=\"link\""), @@ -49,9 +50,9 @@ public enum Html { ROW("
${0}
"), // TABLE_END(""), - TABLE_START_2(""), - TABLE_START_3("
${0}${1}
"), - TABLE_START_4("
${0}${1}${2}
"), + TABLE_START_2("
${0}${1}${2}${3}
"), + TABLE_START_3("
${0}${1}
"), + TABLE_START_4("
${0}${1}${2}
"), TABLE_SESSIONS(DIV_W_CLASS_STYLE.parse("box-footer scrollbar", "padding: 2px;", TABLE_START_4.parse("Player", "Started", "Length", "World - Time") + "${3}" + TABLE_END.parse()) ), diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlStructure.java b/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlStructure.java index 1185c65db..4a02ee554 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlStructure.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlStructure.java @@ -92,7 +92,6 @@ public class HtmlStructure { return builder.toString(); } - @Deprecated public static String[] createSessionsTabContentInspectPage(Map> sessions, List allSessions, UUID uuid) { Map>> map = new HashMap<>(); map.put(uuid, sessions); @@ -357,9 +356,9 @@ public class HtmlStructure { StringBuilder html = new StringBuilder("

"); if (offline) { - html.append(Html.FA_COLORED_ICON.parse("red", "ball")).append(" ").append(online); + html.append(Html.FA_COLORED_ICON.parse("red", "circle")).append(" ").append(online); } else { - html.append(Html.FA_COLORED_ICON.parse("green", "ball")).append(" ").append(online); + html.append(Html.FA_COLORED_ICON.parse("green", "circle")).append(" Online (").append(online).append(")"); } html.append("

"); if (op) { diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java b/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java index 0393466ac..9f494c01d 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java @@ -38,16 +38,14 @@ public class SessionTabStructureCreator { } if (Verify.isEmpty(allSessions)) { - return new String[]{"
" + - "
" + - "
" + + return new String[]{"
" + "

No Sessions

" + - "
", ""}; + "
", ""}; } Map serverNameIDMap = generateIDtoServerNameMap(sessions); - StringBuilder html = new StringBuilder(); + StringBuilder html = new StringBuilder("
"); StringBuilder viewScript = new StringBuilder(); int i = 0; for (Session session : allSessions) { @@ -61,79 +59,90 @@ public class SessionTabStructureCreator { String sessionStart = FormatUtils.formatTimeStampYear(session.getSessionStart()); String sessionLength = FormatUtils.formatTimeAmount(session.getLength()); - String sessionEnd = FormatUtils.formatTimeStampYear(session.getSessionEnd()); + String sessionEnd = session.getSessionEnd() == -1 ? "Online" : FormatUtils.formatTimeStampYear(session.getSessionEnd()); + + int playerKillCount = session.getPlayerKills().size(); String name = Plan.getInstance().getDataCache().getName(uuid); - String link = Html.LINK.parse(Plan.getPlanAPI().getPlayerInspectPageLink(name), name); + String link = Plan.getPlanAPI().getPlayerInspectPageLink(name); String dotSeparated = appendName ? - HtmlStructure.separateWithDots(link, sessionStart, sessionLength) : - HtmlStructure.separateWithDots(sessionStart, sessionLength); - - // Session-column starts & header. - html.append("
") - .append("
") - .append("
") - .append("

").append(dotSeparated).append("

") - .append("
") - .append("
"); - - - // Left side of Session box - html.append("
") - .append("
") // - .append("
"); - - // Left side header - html.append("
") - .append("

") - .append(sessionStart) - .append("

") - .append("
"); - - // Left side content - html.append("
") - .append("

Session Length: ").append(sessionLength).append("
") - .append("Session Ended: ").append(sessionEnd).append("
") - .append("Server: ").append(serverName).append("

") - .append("Mob Kills: ").append(session.getMobKills()).append("
") - .append("Deaths: ").append(session.getDeaths()).append("

"); - - html.append(KillsTableCreator.createTable(session.getPlayerKills())) - .append("
"); // Left Side content ends - - // Left side ends & Right side starts - html.append("
") - .append("
"); + HtmlStructure.separateWithDots(name, sessionStart) : + sessionStart; String id = "worldPie" + session.getSessionStart() + i; - - html.append("
"); - WorldTimes worldTimes = session.getWorldTimes(); AnalysisUtils.addMissingWorlds(worldTimes); String[] worldData = WorldPieCreator.createSeriesData(worldTimes); - html.append(""); + .append("") + .append("
") // Right col-6 + .append("
") // Closes row clearfix + .append("
") + .append("
") // Left2 col-6 + .append(killTable) + .append("
"); // Closes Left2 col-6 + if (appendName) { + html.append("
") // Right2 col-6 + .append("") + .append("
"); // Closes Right2 col-6 + } + html.append("
") // Closes row clearfix + .append("
") // Closes panel-body + .append("
") // Closes panel-collapse + .append("
"); // Closes panel viewScript.append("worldPie(") .append(id).append(", ") .append(id).append("series, ") .append(id).append("gmseries") .append(");"); - - // Session-col, Row, Session-Content, Session-column ends. - html.append("") - .append("") - .append("") - .append(""); - i++; } - return new String[]{html.toString(), viewScript.toString()}; + return new String[]{html.append("").toString(), viewScript.toString()}; } private static Map generateIDtoServerNameMap(Map>> sessions) { diff --git a/Plan/src/main/resources/web/player.html b/Plan/src/main/resources/web/player.html index 005431956..081d81475 100644 --- a/Plan/src/main/resources/web/player.html +++ b/Plan/src/main/resources/web/player.html @@ -452,7 +452,6 @@ - diff --git a/Plan/src/main/resources/web/temp.html b/Plan/src/main/resources/web/temp.html new file mode 100644 index 000000000..8df803494 --- /dev/null +++ b/Plan/src/main/resources/web/temp.html @@ -0,0 +1,3900 @@ +
+
+ +
+
+
+
+
+

Last 50 Sessions

+
+
+
+
+
+ +
+
+
+
+
Nov 21 + 2017, 10:20 -> Nov 21 2017, 10:40 +
+
    +
  • Session EndedNov 21 2017, 10:40
  • +
  • Session Length20m 11s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+
${0}${1}${2}${3}
+ + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+ + + + + +
+ +
+
+
+
+
Nov 21 + 2017, 10:11 -> Nov 21 2017, 10:17 +
+
    +
  • Session EndedNov 21 2017, 10:17
  • +
  • Session Length6m
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Nov 21 + 2017, 10:08 -> Nov 21 2017, 10:11 +
+
    +
  • Session EndedNov 21 2017, 10:11
  • +
  • Session Length2m 29s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Nov 21 + 2017, 10:07 -> Nov 21 2017, 10:08 +
+
    +
  • Session EndedNov 21 2017, 10:08
  • +
  • Session Length41s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Nov 13 + 2017, 19:15 -> Nov 13 2017, 19:15 +
+
    +
  • Session EndedNov 13 2017, 19:15
  • +
  • Session Length30s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Nov 13 + 2017, 19:12 -> Nov 13 2017, 19:14 +
+
    +
  • Session EndedNov 13 2017, 19:14
  • +
  • Session Length1m 49s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Nov 08 + 2017, 09:04 -> Nov 08 2017, 09:50 +
+
    +
  • Session EndedNov 08 2017, 09:50
  • +
  • Session Length45m 28s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths1 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Nov 06 + 2017, 14:56 -> Nov 06 2017, 14:56 +
+
    +
  • Session EndedNov 06 2017, 14:56
  • +
  • Session Length7s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 31 + 2017, 10:51 -> Oct 31 2017, 10:52 +
+
    +
  • Session EndedOct 31 2017, 10:52
  • +
  • Session Length1m 4s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths1 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:19 -> Oct 30 2017, 14:20 +
+
    +
  • Session EndedOct 30 2017, 14:20
  • +
  • Session Length26s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:18 -> Oct 30 2017, 14:18 +
+
    +
  • Session EndedOct 30 2017, 14:18
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:17 -> Oct 30 2017, 14:17 +
+
    +
  • Session EndedOct 30 2017, 14:17
  • +
  • Session Length25s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:16 -> Oct 30 2017, 14:16 +
+
    +
  • Session EndedOct 30 2017, 14:16
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:14 -> Oct 30 2017, 14:14 +
+
    +
  • Session EndedOct 30 2017, 14:14
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:13 -> Oct 30 2017, 14:13 +
+
    +
  • Session EndedOct 30 2017, 14:13
  • +
  • Session Length1s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:12 -> Oct 30 2017, 14:12 +
+
    +
  • Session EndedOct 30 2017, 14:12
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:11 -> Oct 30 2017, 14:11 +
+
    +
  • Session EndedOct 30 2017, 14:11
  • +
  • Session Length1s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:10 -> Oct 30 2017, 14:10 +
+
    +
  • Session EndedOct 30 2017, 14:10
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:09 -> Oct 30 2017, 14:09 +
+
    +
  • Session EndedOct 30 2017, 14:09
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:08 -> Oct 30 2017, 14:08 +
+
    +
  • Session EndedOct 30 2017, 14:08
  • +
  • Session Length8s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 14:04 -> Oct 30 2017, 14:05 +
+
    +
  • Session EndedOct 30 2017, 14:05
  • +
  • Session Length1m 1s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:57 -> Oct 30 2017, 13:57 +
+
    +
  • Session EndedOct 30 2017, 13:57
  • +
  • Session Length1s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:53 -> Oct 30 2017, 13:53 +
+
    +
  • Session EndedOct 30 2017, 13:53
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:52 -> Oct 30 2017, 13:53 +
+
    +
  • Session EndedOct 30 2017, 13:53
  • +
  • Session Length22s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:50 -> Oct 30 2017, 13:50 +
+
    +
  • Session EndedOct 30 2017, 13:50
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:48 -> Oct 30 2017, 13:48 +
+
    +
  • Session EndedOct 30 2017, 13:48
  • +
  • Session Length1s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:47 -> Oct 30 2017, 13:47 +
+
    +
  • Session EndedOct 30 2017, 13:47
  • +
  • Session Length1s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:44 -> Oct 30 2017, 13:44 +
+
    +
  • Session EndedOct 30 2017, 13:44
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:41 -> Oct 30 2017, 13:41 +
+
    +
  • Session EndedOct 30 2017, 13:41
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:39 -> Oct 30 2017, 13:39 +
+
    +
  • Session EndedOct 30 2017, 13:39
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:37 -> Oct 30 2017, 13:37 +
+
    +
  • Session EndedOct 30 2017, 13:37
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:36 -> Oct 30 2017, 13:36 +
+
    +
  • Session EndedOct 30 2017, 13:36
  • +
  • Session Length15s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:34 -> Oct 30 2017, 13:34 +
+
    +
  • Session EndedOct 30 2017, 13:34
  • +
  • Session Length2s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:32 -> Oct 30 2017, 13:32 +
+
    +
  • Session EndedOct 30 2017, 13:32
  • +
  • Session Length1s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:30 -> Oct 30 2017, 13:31 +
+
    +
  • Session EndedOct 30 2017, 13:31
  • +
  • Session Length25s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:29 -> Oct 30 2017, 13:29 +
+
    +
  • Session EndedOct 30 2017, 13:29
  • +
  • Session Length4s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:28 -> Oct 30 2017, 13:28 +
+
    +
  • Session EndedOct 30 2017, 13:28
  • +
  • Session Length4s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:27 -> Oct 30 2017, 13:27 +
+
    +
  • Session EndedOct 30 2017, 13:27
  • +
  • Session Length18s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:26 -> Oct 30 2017, 13:26 +
+
    +
  • Session EndedOct 30 2017, 13:26
  • +
  • Session Length7s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:24 -> Oct 30 2017, 13:24 +
+
    +
  • Session EndedOct 30 2017, 13:24
  • +
  • Session Length14s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:23 -> Oct 30 2017, 13:23 +
+
    +
  • Session EndedOct 30 2017, 13:23
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:22 -> Oct 30 2017, 13:22 +
+
    +
  • Session EndedOct 30 2017, 13:22
  • +
  • Session Length35s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:21 -> Oct 30 2017, 13:21 +
+
    +
  • Session EndedOct 30 2017, 13:21
  • +
  • Session Length6s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:20 -> Oct 30 2017, 13:20 +
+
    +
  • Session EndedOct 30 2017, 13:20
  • +
  • Session Length26s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:18 -> Oct 30 2017, 13:18 +
+
    +
  • Session EndedOct 30 2017, 13:18
  • +
  • Session Length39s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:17 -> Oct 30 2017, 13:17 +
+
    +
  • Session EndedOct 30 2017, 13:17
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:16 -> Oct 30 2017, 13:16 +
+
    +
  • Session EndedOct 30 2017, 13:16
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:15 -> Oct 30 2017, 13:15 +
+
    +
  • Session EndedOct 30 2017, 13:15
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:13 -> Oct 30 2017, 13:14 +
+
    +
  • Session EndedOct 30 2017, 13:14
  • +
  • Session Length30s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+
+ +
+
+
+
+
Oct 30 + 2017, 13:04 -> Oct 30 2017, 13:04 +
+
    +
  • Session EndedOct 30 2017, 13:04
  • +
  • Session Length3s
  • +
  • ServerServer 1
  • +
  • +
  • Player Kills0
  • +
  • Mob Kills0
  • +
  • Deaths0 +
  • +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
TimeKilledWith
No Kills
+
+
+
+
+
+ + + +
+ +
+
+
+
+

World Playtime

+
+
+
+
+
+
+
+ + +
+
+
+
+

Server Preference

+
+
+
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/Plan/test/main/java/com/djrapitops/plan/utilities/html/HtmlStructureTest.java b/Plan/test/main/java/com/djrapitops/plan/utilities/html/HtmlStructureTest.java index 8716cac9e..d7fbcaa41 100644 --- a/Plan/test/main/java/com/djrapitops/plan/utilities/html/HtmlStructureTest.java +++ b/Plan/test/main/java/com/djrapitops/plan/utilities/html/HtmlStructureTest.java @@ -4,20 +4,16 @@ import main.java.com.djrapitops.plan.data.Session; import org.apache.commons.lang3.StringUtils; import org.bukkit.plugin.java.JavaPlugin; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import test.java.utils.MockUtils; import test.java.utils.RandomData; import test.java.utils.TestInit; -import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; @@ -45,17 +41,4 @@ public class HtmlStructureTest { assertEquals(opened, closed); } - - @Test - // TODO fix DataCache mock dependency - @Ignore("Has some DataCache mock issue") - public void createSessionsTabContent() throws Exception { - List allSessions = sessions.values().stream().flatMap(Collection::stream).collect(Collectors.toList()); - String[] sessionsTab = HtmlStructure.createSessionsTabContentInspectPage(sessions, allSessions, MockUtils.getPlayerUUID()); - - int opened = StringUtils.countMatches(sessionsTab[0], "