mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-07 04:18:26 +02:00
Server Accordion to Player page
This commit is contained in:
parent
5f55b9684c
commit
227c66961a
@ -34,6 +34,7 @@ import com.djrapitops.plan.utilities.formatting.Formatter;
|
||||
import com.djrapitops.plan.utilities.formatting.Formatters;
|
||||
import com.djrapitops.plan.utilities.html.graphs.Graphs;
|
||||
import com.djrapitops.plan.utilities.html.graphs.pie.WorldPie;
|
||||
import com.djrapitops.plan.utilities.html.structure.ServerAccordion;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
@ -84,6 +85,7 @@ public class PlayerJSONParser {
|
||||
PlayerContainer player = db.query(new PlayerContainerQuery(playerUUID));
|
||||
SessionsMutator sessionsMutator = SessionsMutator.forContainer(player);
|
||||
Map<UUID, WorldTimes> worldTimesPerServer = PerServerMutator.forContainer(player).worldTimesPerServer();
|
||||
List<Map<String, Object>> serverAccordion = new ServerAccordion(player, serverNames, graphs, year, timeAmount).asMaps();
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("info", createInfoJSONMap(player, serverNames));
|
||||
@ -99,6 +101,7 @@ public class PlayerJSONParser {
|
||||
data.put("player_kills", player.getValue(PlayerKeys.PLAYER_KILLS).orElse(Collections.emptyList()));
|
||||
data.put("player_deaths", player.getValue(PlayerKeys.PLAYER_DEATHS_KILLS).orElse(Collections.emptyList()));
|
||||
data.put("sessions", sessionsMutator.toServerNameJSONMaps(graphs, config.getWorldAliasSettings(), formatters));
|
||||
data.put("servers", serverAccordion);
|
||||
data.put("punchcard_series", graphs.special().punchCard(sessionsMutator).getDots());
|
||||
WorldPie worldPie = graphs.pie().worldPie(player.getValue(PlayerKeys.WORLD_TIMES).orElse(new WorldTimes()));
|
||||
data.put("world_pie_series", worldPie.getSlices());
|
||||
|
@ -23,141 +23,76 @@ import com.djrapitops.plan.data.store.keys.PerServerKeys;
|
||||
import com.djrapitops.plan.data.store.keys.PlayerKeys;
|
||||
import com.djrapitops.plan.data.store.mutators.SessionsMutator;
|
||||
import com.djrapitops.plan.data.time.WorldTimes;
|
||||
import com.djrapitops.plan.system.settings.theme.Theme;
|
||||
import com.djrapitops.plan.system.settings.theme.ThemeVal;
|
||||
import com.djrapitops.plan.utilities.formatting.Formatter;
|
||||
import com.djrapitops.plan.utilities.html.graphs.Graphs;
|
||||
import com.djrapitops.plan.utilities.html.graphs.pie.WorldPie;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icons;
|
||||
import com.djrapitops.plugin.utilities.Format;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* HTML utility class for creating a Server Accordion.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
public class ServerAccordion extends Accordion {
|
||||
|
||||
private final StringBuilder viewScript;
|
||||
public class ServerAccordion {
|
||||
|
||||
private final Map<UUID, String> serverNames;
|
||||
private PerServerContainer perServer;
|
||||
private final PerServerContainer perServer;
|
||||
|
||||
private final Theme theme;
|
||||
private final Graphs graphs;
|
||||
private final Formatter<Long> yearLongFormatter;
|
||||
private final Formatter<Long> timeAmountFormatter;
|
||||
private final Formatter<Long> year;
|
||||
private final Formatter<Long> timeAmount;
|
||||
|
||||
public ServerAccordion(
|
||||
PlayerContainer container, Map<UUID, String> serverNames,
|
||||
Theme theme,
|
||||
Graphs graphs,
|
||||
Formatter<Long> yearLongFormatter,
|
||||
Formatter<Long> timeAmountFormatter
|
||||
Formatter<Long> year,
|
||||
Formatter<Long> timeAmount
|
||||
) {
|
||||
super("server_accordion");
|
||||
this.theme = theme;
|
||||
this.graphs = graphs;
|
||||
this.yearLongFormatter = yearLongFormatter;
|
||||
this.timeAmountFormatter = timeAmountFormatter;
|
||||
|
||||
viewScript = new StringBuilder();
|
||||
this.year = year;
|
||||
this.timeAmount = timeAmount;
|
||||
|
||||
this.serverNames = serverNames;
|
||||
Optional<PerServerContainer> perServerData = container.getValue(PlayerKeys.PER_SERVER);
|
||||
if (perServerData.isPresent()) {
|
||||
perServer = perServerData.get();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
addElements();
|
||||
perServer = container.getValue(PlayerKeys.PER_SERVER)
|
||||
.orElse(new PerServerContainer());
|
||||
}
|
||||
|
||||
public String toViewScript() {
|
||||
return viewScript.toString();
|
||||
}
|
||||
|
||||
private void addElements() {
|
||||
int i = 0;
|
||||
public List<Map<String, Object>> asMaps() {
|
||||
List<Map<String, Object>> servers = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<UUID, DataContainer> entry : perServer.entrySet()) {
|
||||
UUID serverUUID = entry.getKey();
|
||||
DataContainer container = entry.getValue();
|
||||
DataContainer perServer = entry.getValue();
|
||||
Map<String, Object> server = new HashMap<>();
|
||||
|
||||
String serverName = serverNames.getOrDefault(serverUUID, "Unknown");
|
||||
WorldTimes worldTimes = container.getValue(PerServerKeys.WORLD_TIMES).orElse(new WorldTimes());
|
||||
SessionsMutator sessionsMutator = SessionsMutator.forContainer(container);
|
||||
WorldTimes worldTimes = perServer.getValue(PerServerKeys.WORLD_TIMES).orElse(new WorldTimes());
|
||||
SessionsMutator sessionsMutator = SessionsMutator.forContainer(perServer);
|
||||
|
||||
boolean banned = container.getValue(PerServerKeys.BANNED).orElse(false);
|
||||
boolean operator = container.getValue(PerServerKeys.OPERATOR).orElse(false);
|
||||
long registered = container.getValue(PerServerKeys.REGISTERED).orElse(0L);
|
||||
server.put("server_name", serverName);
|
||||
|
||||
long playtime = sessionsMutator.toPlaytime();
|
||||
long afkTime = sessionsMutator.toAfkTime();
|
||||
int sessionCount = sessionsMutator.count();
|
||||
long sessionMedian = sessionsMutator.toMedianSessionLength();
|
||||
long longestSession = sessionsMutator.toLongestSessionLength();
|
||||
server.put("banned", perServer.getValue(PerServerKeys.BANNED).orElse(false));
|
||||
server.put("operator", perServer.getValue(PerServerKeys.OPERATOR).orElse(false));
|
||||
server.put("registered", year.apply(perServer.getValue(PerServerKeys.REGISTERED).orElse(0L)));
|
||||
server.put("last_seen", year.apply(sessionsMutator.toLastSeen()));
|
||||
|
||||
long mobKills = sessionsMutator.toMobKillCount();
|
||||
long playerKills = sessionsMutator.toPlayerKillCount();
|
||||
long deaths = sessionsMutator.toDeathCount();
|
||||
server.put("session_count", sessionsMutator.count());
|
||||
server.put("playtime", timeAmount.apply(sessionsMutator.toPlaytime()));
|
||||
server.put("afk_time", timeAmount.apply(sessionsMutator.toAfkTime()));
|
||||
server.put("session_median", timeAmount.apply(sessionsMutator.toMedianSessionLength()));
|
||||
server.put("longest_session_length", timeAmount.apply(sessionsMutator.toLongestSessionLength()));
|
||||
|
||||
String play = timeAmountFormatter.apply(playtime);
|
||||
String afk = timeAmountFormatter.apply(afkTime);
|
||||
String median = timeAmountFormatter.apply(sessionMedian);
|
||||
String longest = timeAmountFormatter.apply(longestSession);
|
||||
|
||||
String sanitizedServerName = new Format(serverName)
|
||||
.removeSymbols()
|
||||
.removeWhitespace().toString() + i;
|
||||
String htmlID = "server_" + sanitizedServerName;
|
||||
|
||||
String worldId = "worldPieServer" + sanitizedServerName;
|
||||
server.put("mob_kills", sessionsMutator.toMobKillCount());
|
||||
server.put("player_kills", sessionsMutator.toPlayerKillCount());
|
||||
server.put("deaths", sessionsMutator.toDeathCount());
|
||||
|
||||
WorldPie worldPie = graphs.pie().worldPie(worldTimes);
|
||||
server.put("world_pie_series", worldPie.getSlices());
|
||||
server.put("gm_series", worldPie.toHighChartsDrillDownMaps());
|
||||
|
||||
String title = serverName + "<span class=\"pull-right\">" + play + "</span>";
|
||||
|
||||
String leftSide = new AccordionElementContentBuilder()
|
||||
.addRowBold(Icons.OPERATOR, "Operator", operator ? "Yes" : "No")
|
||||
.addRowBold(Icons.BANNED, "Banned", banned ? "Yes" : "No")
|
||||
.addRowBold(Icon.called("user-plus").of(Color.LIGHT_GREEN), "Registered", yearLongFormatter.apply(registered))
|
||||
.addBreak()
|
||||
.addRowBold(Icons.SESSION_COUNT, "Sessions", sessionCount)
|
||||
.addRowBold(Icons.PLAYTIME, "Server Playtime", play)
|
||||
.addRowBold(Icons.AFK_LENGTH, "Time AFK", afk)
|
||||
.addRowBold(Icons.SESSION_LENGTH, "Longest Session", longest)
|
||||
.addRowBold(Icons.SESSION_LENGTH, "Session Median", median)
|
||||
.addBreak()
|
||||
.addRowBold(Icons.PLAYER_KILLS, "Player Kills", playerKills)
|
||||
.addRowBold(Icons.MOB_KILLS, "Mob Kills", mobKills)
|
||||
.addRowBold(Icons.DEATHS, "Deaths", deaths)
|
||||
.toHtml();
|
||||
|
||||
String rightSide = "<div id=\"" + worldId + "\" class=\"dashboard-donut-chart\"></div>" +
|
||||
"<script>" +
|
||||
"var " + worldId + "series = {name:'World Playtime',colorByPoint:true,data:" + worldPie.toHighChartsSeries() + "};" +
|
||||
"var " + worldId + "gmseries = " + worldPie.toHighChartsDrilldown() + ";" +
|
||||
"</script>";
|
||||
|
||||
addElement(new AccordionElement(htmlID, title)
|
||||
.setColor(theme.getValue(ThemeVal.PARSED_SERVER_ACCORDION))
|
||||
.setLeftSide(leftSide)
|
||||
.setRightSide(rightSide));
|
||||
|
||||
viewScript.append("worldPie(")
|
||||
.append(worldId).append(", ")
|
||||
.append(worldId).append("series, ")
|
||||
.append(worldId).append("gmseries")
|
||||
.append(");");
|
||||
|
||||
i++;
|
||||
servers.add(server);
|
||||
}
|
||||
return servers;
|
||||
}
|
||||
}
|
||||
|
@ -142,4 +142,68 @@ function createConnectionsTableBody(connections) {
|
||||
|
||||
table += '</tbody>';
|
||||
return table;
|
||||
}
|
||||
|
||||
function loadServerAccordion(json, error) {
|
||||
if (error) {
|
||||
$('#server-overview').addClass('forbidden'); // TODO Figure out 403
|
||||
return;
|
||||
}
|
||||
|
||||
serverTable = $("#server-overview").find("#tableServerAccordion").find("tbody");
|
||||
|
||||
var servers = json.servers;
|
||||
|
||||
if (!servers.length) {
|
||||
serverTable.append('<tr><td>No Sessions</td><td>-</td><td>-</td><td>-</td></tr>')
|
||||
}
|
||||
|
||||
for (var i = 0; i < servers.length; i++) {
|
||||
var server = servers[i];
|
||||
var title = createServerAccordionTitle(i, server);
|
||||
var body = createServerAccordionBody(i, server);
|
||||
|
||||
var worldSeries = {name: 'World Playtime', colorByPoint: true, data: server.world_pie_series};
|
||||
var gmSeries = server.gm_series;
|
||||
|
||||
serverTable.append(title);
|
||||
serverTable.append(body);
|
||||
|
||||
worldPie("worldpie_server_" + i, worldSeries, gmSeries);
|
||||
}
|
||||
}
|
||||
|
||||
function createServerAccordionTitle(i, server) {
|
||||
return '<tr aria-controls="server_t_' + i + '" aria-expanded="false" class="clickable collapsed bg-light-green" data-target="#server_t_' + i + '" data-toggle="collapse"><td>'
|
||||
+ server.server_name +
|
||||
(server.operator ? ' <i class="col-blue fab fa-fw fa-superpowers"></i>' : '') +
|
||||
(server.banned ? ' <i class="col-red fas fa-fw fa-gavel"></i>' : '') +
|
||||
'</td>'
|
||||
+ '<td>' + server.playtime + '</td>'
|
||||
+ '<td>' + server.registered + '</td>'
|
||||
+ '<td>' + server.last_seen + '</td></tr>'
|
||||
}
|
||||
|
||||
function createServerAccordionBody(i, server) {
|
||||
|
||||
return '<tr class="collapse" data-parent="#tableServerAccordion" id="server_t_' + i + '">' +
|
||||
'<td colspan="4">' +
|
||||
'<div class="collapse row" data-parent="#tableServerAccordion" id="server_t_' + i + '">' +
|
||||
'<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">' +
|
||||
(server.operator ? '<p><i class="col-blue fab fa-fw fa-superpowers"></i> Operator</p>' : '') +
|
||||
(server.banned ? '<p><i class="col-red fas fa-fw fa-gavel"></i> Banned</p>' : '') +
|
||||
(server.operator || server.banned ? '<br>' : '') +
|
||||
'<p><i class="col-teal far fa-fw fa-calendar-check"></i> Sessions<span class="float-right"><b>' + server.session_count + '</b></span></p>' +
|
||||
'<p><i class="col-green far fa-fw fa-clock"></i> Playtime<span class="float-right"><b>' + server.playtime + '</b></span></p>' +
|
||||
'<p><i class="col-grey far fa-fw fa-clock"></i> Time AFK<span class="float-right"><b>' + server.afk_time + '</b></span></p>' +
|
||||
'<p><i class="col-teal far fa-fw fa-clock"></i> Longest Session<span class="float-right"><b>' + server.longest_session_length + '</b></span></p>' +
|
||||
'<p><i class="col-teal far fa-fw fa-clock"></i> Session Median<span class="float-right"><b>' + server.session_median + '</b></span></p>' +
|
||||
'<br>' +
|
||||
'<p><i class="col-red fa fa-fw fa-crosshairs"></i> Player Kills<span class="float-right"><b>' + server.player_kills + '</b></span></p>' +
|
||||
'<p><i class="col-green fa fa-fw fa-crosshairs"></i> Mob Kills<span class="float-right"><b>' + server.mob_kills + '</b></span></p>' +
|
||||
'<p><i class=" fa fa-fw fa-skull"></i> Deaths<span class="float-right"><b>' + server.deaths + '</b></span></p>' +
|
||||
'</div><div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">' +
|
||||
'<div id="worldpie_server_' + i + '" class="chart-pie"></div>' +
|
||||
'</div>' +
|
||||
'</div></td></tr>'
|
||||
}
|
@ -60,7 +60,7 @@ function createAccordionBody(i, session) {
|
||||
'<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">' +
|
||||
'<p><i class="col-teal far fa-fw fa-clock"></i> Session Ended<span class="float-right"><b>' + session.end + '</b></span></p>' +
|
||||
'<p><i class="col-green far fa-fw fa-clock"></i> Session Length<span class="float-right"><b>' + session.length + '</b></span></p>' +
|
||||
'<p><i class="col-grey far fa-fw fa-clock"></i> AFK<span class="float-right"><b>' + session.afk_time + '</b></span></p>' +
|
||||
'<p><i class="col-grey far fa-fw fa-clock"></i> Time AFK<span class="float-right"><b>' + session.afk_time + '</b></span></p>' +
|
||||
'<p><i class="col-green fa fa-fw fa-server"></i> Server<span class="float-right"><b>' + session.server_name + '</b></span></p><br>' +
|
||||
'<p><i class="col-red fa fa-fw fa-crosshairs"></i> Player Kills<span class="float-right"><b>' + session.player_kills.length + '</b></span></p>' +
|
||||
'<p><i class="col-green fa fa-fw fa-crosshairs"></i> Mob Kills<span class="float-right"><b>' + session.mob_kills + '</b></span></p>' +
|
||||
|
@ -521,7 +521,7 @@
|
||||
</div> <!-- /.container-fluid -->
|
||||
</div> <!-- End of PvP & PvE Tab -->
|
||||
<!-- Begin Servers Overview Tab -->
|
||||
<div class="tab">
|
||||
<div class="tab" id="server-overview">
|
||||
<div class="container-fluid mt-4">
|
||||
<!-- Page Heading -->
|
||||
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
||||
@ -553,427 +553,7 @@
|
||||
<th><i class="far fa-fw fa-calendar-plus"></i> Registered</th>
|
||||
<th><i class="far fa-fw fa-calendar-check"></i> Last Seen</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr aria-controls="server_t_1" aria-expanded="true"
|
||||
class="clickable collapsed bg-light-green" data-target="#server_t_1"
|
||||
data-toggle="collapse">
|
||||
<td>Server 1</td>
|
||||
<td>54s</td>
|
||||
<td>Oct 28 2018, 10:05</td>
|
||||
<td>Oct 28 2018, 10:05</td>
|
||||
</tr>
|
||||
<tr class="collapse" data-parent="#tableServerAccordion" id="server_t_1">
|
||||
<td colspan="4">
|
||||
<div class="collapse row" data-parent="#tableServerAccordion"
|
||||
id="server_t_1">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
||||
<p><i class="col-blue fab fa-fw fa-superpowers"></i>
|
||||
Operator<span class="float-right"><b>No</b></span>
|
||||
</p>
|
||||
<p><i class="col-red fa fa-fw fa-gavel"></i> Banned<span
|
||||
class="float-right"><b>No</b></span></p>
|
||||
<p><i class="col-light-green fa fa-fw fa-user-plus"></i>
|
||||
Registered<span class="float-right"><b>May 30 2017,
|
||||
15:02</b></span></p><br>
|
||||
<p><i class="col-teal far fa-fw fa-calendar-check"></i>
|
||||
Sessions<span class="float-right"><b>96</b></span>
|
||||
</p>
|
||||
<p><i class="col-green far fa-fw fa-clock"></i> Server
|
||||
Playtime<span class="float-right"><b>8h 4m
|
||||
21s</b></span></p>
|
||||
<p><i class="col-grey far fa-fw fa-clock"></i> Time AFK<span
|
||||
class="float-right"><b>4h 26m 32s</b></span></p>
|
||||
<p><i class="col-teal far fa-fw fa-clock"></i> Longest
|
||||
Session<span class="float-right"><b>4h 33m
|
||||
6s</b></span></p>
|
||||
<p><i class="col-teal far fa-fw fa-clock"></i> Session
|
||||
Median<span class="float-right"><b>22s</b></span></p>
|
||||
<br>
|
||||
<p><i class="col-red fa fa-fw fa-crosshairs"></i> Player
|
||||
Kills<span class="float-right"><b>0</b></span></p>
|
||||
<p><i class="col-green fa fa-fw fa-crosshairs"></i> Mob
|
||||
Kills<span class="float-right"><b>22</b></span></p>
|
||||
<p><i class=" fa fa-fw fa-skull"></i> Deaths<span
|
||||
class="float-right"><b>8</b></span></p>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="dashboard-donut-chart"
|
||||
data-highcharts-chart="16"
|
||||
id="worldPieSession15407139399600"
|
||||
style="overflow: hidden;">
|
||||
<div class="highcharts-container " dir="ltr"
|
||||
id="highcharts-otzrxhx-11604"
|
||||
style="position: relative; overflow: hidden; width: 426px; height: 265px; text-align: left; line-height: normal; z-index: 0; left: 0px; top: 0px;">
|
||||
<svg class="highcharts-root " height="265"
|
||||
style="font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;font-size:12px;"
|
||||
version="1.1" viewBox="0 0 426 265" width="426"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<desc>Created with Highstock 7.0.3</desc>
|
||||
<defs>
|
||||
<clipPath id="highcharts-otzrxhx-11606">
|
||||
<rect fill="none" height="166"
|
||||
width="406" x="0" y="0"></rect>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<rect class="highcharts-background"
|
||||
fill="#ffffff" height="265" rx="0" ry="0"
|
||||
width="426" x="0" y="0">
|
||||
</rect>
|
||||
<rect class="highcharts-plot-background"
|
||||
fill="none" height="166" width="406" x="10"
|
||||
y="43"></rect>
|
||||
<g class="highcharts-pane-group"
|
||||
data-z-index="0"></g>
|
||||
<rect class="highcharts-plot-border"
|
||||
data-z-index="1" fill="none" height="166"
|
||||
width="406" x="10" y="43"></rect>
|
||||
<g class="highcharts-series-group"
|
||||
data-z-index="3">
|
||||
<g class="highcharts-series highcharts-series-0 highcharts-pie-series highcharts-tracker "
|
||||
data-z-index="0.1"
|
||||
style="cursor:pointer;"
|
||||
transform="translate(10,43) scale(1 1)">
|
||||
<path
|
||||
class="highcharts-halo highcharts-color-0 "
|
||||
d="M 202.98513185613027 10.000001514121266 A 73 73 0 1 1 202.8986044645208 10.000070418216254 M 202.89999344445886 11.000069453583151 A 72 72 0 1 0 202.98533552933395 11.00000149337987 "
|
||||
data-z-index="-1" fill="#0099C6"
|
||||
fill-opacity="0.25"
|
||||
style="cursor:auto;"
|
||||
visibility="hidden"></path>
|
||||
<path
|
||||
class="highcharts-point highcharts-color-0 highcharts-drilldown-point "
|
||||
d="M 202.98513185613027 10.000001514121266 A 73 73 0 1 1 202.8986044645208 10.000070418216254 M 203 83 A 0 0 0 1 0 203 83 "
|
||||
fill="rgb(0,153,198)"
|
||||
stroke="#ffffff"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="1"
|
||||
style="cursor:pointer;"
|
||||
transform="translate(0,0)"></path>
|
||||
</g>
|
||||
<g class="highcharts-markers highcharts-series-0 highcharts-pie-series "
|
||||
data-z-index="0.1"
|
||||
transform="translate(10,43) scale(1 1)">
|
||||
</g>
|
||||
</g>
|
||||
<text class="highcharts-title" data-z-index="4"
|
||||
style="color:#333333;font-size:18px;fill:#333333;"
|
||||
text-anchor="middle" x="213" y="24"></text>
|
||||
<text class="highcharts-subtitle"
|
||||
data-z-index="4"
|
||||
style="color:#666666;fill:#666666;"
|
||||
text-anchor="middle" x="213" y="24">
|
||||
<tspan>Click the slices to view used
|
||||
GameMode
|
||||
</tspan>
|
||||
</text>
|
||||
<g class="highcharts-legend" data-z-index="7"
|
||||
transform="translate(178,221)">
|
||||
<rect class="highcharts-legend-box"
|
||||
fill="none" height="29" rx="0" ry="0"
|
||||
visibility="visible" width="70" x="0"
|
||||
y="0"></rect>
|
||||
<g data-z-index="1">
|
||||
<g>
|
||||
<g class="highcharts-legend-item highcharts-pie-series highcharts-color-0"
|
||||
data-z-index="1"
|
||||
transform="translate(8,3)">
|
||||
<text data-z-index="2"
|
||||
style="color:#333333;cursor:pointer;font-size:12px;font-weight:bold;fill:#333333;"
|
||||
text-anchor="start" x="21"
|
||||
y="15">
|
||||
<tspan>world</tspan>
|
||||
</text>
|
||||
<rect class="highcharts-point"
|
||||
data-z-index="3"
|
||||
fill="#0099C6" height="12"
|
||||
rx="6" ry="6" width="12"
|
||||
x="2" y="4"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<text class="highcharts-credits"
|
||||
data-z-index="8"
|
||||
style="cursor:pointer;color:#999999;font-size:9px;fill:#999999;"
|
||||
text-anchor="end" x="416"
|
||||
y="260">Highcharts.com
|
||||
</text>
|
||||
<g class="highcharts-label highcharts-tooltip highcharts-color-0"
|
||||
data-z-index="8" opacity="0"
|
||||
style="pointer-events:none;white-space:nowrap;"
|
||||
transform="translate(101,-9999)"
|
||||
visibility="visible">
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box highcharts-shadow"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="none" stroke="#000000"
|
||||
stroke-opacity="0.049999999999999996"
|
||||
stroke-width="5"
|
||||
transform="translate(1, 1)"></path>
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box highcharts-shadow"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="none" stroke="#000000"
|
||||
stroke-opacity="0.09999999999999999"
|
||||
stroke-width="3"
|
||||
transform="translate(1, 1)"></path>
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box highcharts-shadow"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="none" stroke="#000000"
|
||||
stroke-opacity="0.15" stroke-width="1"
|
||||
transform="translate(1, 1)"></path>
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="rgba(247,247,247,0.85)"
|
||||
stroke="#0099C6" stroke-width="1">
|
||||
</path>
|
||||
<text data-z-index="1"
|
||||
style="font-size:12px;color:#333333;cursor:default;fill:#333333;"
|
||||
x="8" y="20">
|
||||
<tspan style="font-weight:bold">world:
|
||||
</tspan>
|
||||
<tspan dx="0"> 3s (100.00%)</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<script>var worldPieSession15407139399600series = {
|
||||
name: 'World Playtime',
|
||||
colorByPoint: true,
|
||||
data: [{
|
||||
name: 'world',
|
||||
y: 3947,
|
||||
color: "#0099C6",
|
||||
drilldown: 'world'
|
||||
}]
|
||||
};
|
||||
var worldPieSession15407139399600gmseries = [{
|
||||
name: 'world',
|
||||
id: 'world',
|
||||
colors: gmPieColors,
|
||||
data: [['SURVIVAL', 0], ['SPECTATOR', 0], ['CREATIVE', 3947], ['ADVENTURE', 0]]
|
||||
}];</script>
|
||||
<a href="../player/Rsl1122" target="_blank">
|
||||
<button class="float-right btn bg-blue waves-effect"
|
||||
href="../player/Rsl1122" type="button"><i
|
||||
class="fa fa-fw fa-user"></i> Inspect
|
||||
Page
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr aria-controls="server_t_2" aria-expanded="true"
|
||||
class="clickable collapsed bg-light-green" data-target="#server_t_2"
|
||||
data-toggle="collapse">
|
||||
<td>Server 2</td>
|
||||
<td>7m 43s</td>
|
||||
<td>Oct 28 2018, 9:05</td>
|
||||
<td>Oct 28 2018, 9:05</td>
|
||||
</tr>
|
||||
<tr class="collapse" data-parent="#tableServerAccordion" id="server_t_2">
|
||||
<td colspan="4">
|
||||
<div class="row collapse" data-parent="#tableServerAccordion"
|
||||
id="server_t_2">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
||||
<p><i class="col-blue fab fa-fw fa-superpowers"></i>
|
||||
Operator<span class="float-right"><b>No</b></span>
|
||||
</p>
|
||||
<p><i class="col-red fa fa-fw fa-gavel"></i> Banned<span
|
||||
class="float-right"><b>No</b></span></p>
|
||||
<p><i class="col-light-green fa fa-fw fa-user-plus"></i>
|
||||
Registered<span class="float-right"><b>May 30 2017,
|
||||
15:02</b></span></p><br>
|
||||
<p><i class="col-teal far fa-fw fa-calendar-check"></i>
|
||||
Sessions<span class="float-right"><b>96</b></span>
|
||||
</p>
|
||||
<p><i class="col-green far fa-fw fa-clock"></i> Server
|
||||
Playtime<span class="float-right"><b>8h 4m
|
||||
21s</b></span></p>
|
||||
<p><i class="col-grey far fa-fw fa-clock"></i> Time AFK<span
|
||||
class="float-right"><b>4h 26m 32s</b></span></p>
|
||||
<p><i class="col-teal far fa-fw fa-clock"></i> Longest
|
||||
Session<span class="float-right"><b>4h 33m
|
||||
6s</b></span></p>
|
||||
<p><i class="col-teal far fa-fw fa-clock"></i> Session
|
||||
Median<span class="float-right"><b>22s</b></span></p>
|
||||
<br>
|
||||
<p><i class="col-red fa fa-fw fa-crosshairs"></i> Player
|
||||
Kills<span class="float-right"><b>0</b></span></p>
|
||||
<p><i class="col-green fa fa-fw fa-crosshairs"></i> Mob
|
||||
Kills<span class="float-right"><b>22</b></span></p>
|
||||
<p><i class=" fa fa-fw fa-skull"></i> Deaths<span
|
||||
class="float-right"><b>8</b></span></p>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="dashboard-donut-chart"
|
||||
data-highcharts-chart="16"
|
||||
id="worldPieSession15407139399600"
|
||||
style="overflow: hidden;">
|
||||
<div class="highcharts-container " dir="ltr"
|
||||
id="highcharts-otzrxhx-11604"
|
||||
style="position: relative; overflow: hidden; width: 426px; height: 265px; text-align: left; line-height: normal; z-index: 0; left: 0px; top: 0px;">
|
||||
<svg class="highcharts-root " height="265"
|
||||
style="font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;font-size:12px;"
|
||||
version="1.1" viewBox="0 0 426 265" width="426"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<desc>Created with Highstock 7.0.3</desc>
|
||||
<defs>
|
||||
<clipPath id="highcharts-otzrxhx-11606">
|
||||
<rect fill="none" height="166"
|
||||
width="406" x="0" y="0"></rect>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<rect class="highcharts-background"
|
||||
fill="#ffffff" height="265" rx="0" ry="0"
|
||||
width="426" x="0" y="0">
|
||||
</rect>
|
||||
<rect class="highcharts-plot-background"
|
||||
fill="none" height="166" width="406" x="10"
|
||||
y="43"></rect>
|
||||
<g class="highcharts-pane-group"
|
||||
data-z-index="0"></g>
|
||||
<rect class="highcharts-plot-border"
|
||||
data-z-index="1" fill="none" height="166"
|
||||
width="406" x="10" y="43"></rect>
|
||||
<g class="highcharts-series-group"
|
||||
data-z-index="3">
|
||||
<g class="highcharts-series highcharts-series-0 highcharts-pie-series highcharts-tracker "
|
||||
data-z-index="0.1"
|
||||
style="cursor:pointer;"
|
||||
transform="translate(10,43) scale(1 1)">
|
||||
<path
|
||||
class="highcharts-halo highcharts-color-0 "
|
||||
d="M 202.98513185613027 10.000001514121266 A 73 73 0 1 1 202.8986044645208 10.000070418216254 M 202.89999344445886 11.000069453583151 A 72 72 0 1 0 202.98533552933395 11.00000149337987 "
|
||||
data-z-index="-1" fill="#0099C6"
|
||||
fill-opacity="0.25"
|
||||
style="cursor:auto;"
|
||||
visibility="hidden"></path>
|
||||
<path
|
||||
class="highcharts-point highcharts-color-0 highcharts-drilldown-point "
|
||||
d="M 202.98513185613027 10.000001514121266 A 73 73 0 1 1 202.8986044645208 10.000070418216254 M 203 83 A 0 0 0 1 0 203 83 "
|
||||
fill="rgb(0,153,198)"
|
||||
stroke="#ffffff"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="1"
|
||||
style="cursor:pointer;"
|
||||
transform="translate(0,0)"></path>
|
||||
</g>
|
||||
<g class="highcharts-markers highcharts-series-0 highcharts-pie-series "
|
||||
data-z-index="0.1"
|
||||
transform="translate(10,43) scale(1 1)">
|
||||
</g>
|
||||
</g>
|
||||
<text class="highcharts-title" data-z-index="4"
|
||||
style="color:#333333;font-size:18px;fill:#333333;"
|
||||
text-anchor="middle" x="213" y="24"></text>
|
||||
<text class="highcharts-subtitle"
|
||||
data-z-index="4"
|
||||
style="color:#666666;fill:#666666;"
|
||||
text-anchor="middle" x="213" y="24">
|
||||
<tspan>Click the slices to view used
|
||||
GameMode
|
||||
</tspan>
|
||||
</text>
|
||||
<g class="highcharts-legend" data-z-index="7"
|
||||
transform="translate(178,221)">
|
||||
<rect class="highcharts-legend-box"
|
||||
fill="none" height="29" rx="0" ry="0"
|
||||
visibility="visible" width="70" x="0"
|
||||
y="0"></rect>
|
||||
<g data-z-index="1">
|
||||
<g>
|
||||
<g class="highcharts-legend-item highcharts-pie-series highcharts-color-0"
|
||||
data-z-index="1"
|
||||
transform="translate(8,3)">
|
||||
<text data-z-index="2"
|
||||
style="color:#333333;cursor:pointer;font-size:12px;font-weight:bold;fill:#333333;"
|
||||
text-anchor="start" x="21"
|
||||
y="15">
|
||||
<tspan>world</tspan>
|
||||
</text>
|
||||
<rect class="highcharts-point"
|
||||
data-z-index="3"
|
||||
fill="#0099C6" height="12"
|
||||
rx="6" ry="6" width="12"
|
||||
x="2" y="4"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<text class="highcharts-credits"
|
||||
data-z-index="8"
|
||||
style="cursor:pointer;color:#999999;font-size:9px;fill:#999999;"
|
||||
text-anchor="end" x="416"
|
||||
y="260">Highcharts.com
|
||||
</text>
|
||||
<g class="highcharts-label highcharts-tooltip highcharts-color-0"
|
||||
data-z-index="8" opacity="0"
|
||||
style="pointer-events:none;white-space:nowrap;"
|
||||
transform="translate(101,-9999)"
|
||||
visibility="visible">
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box highcharts-shadow"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="none" stroke="#000000"
|
||||
stroke-opacity="0.049999999999999996"
|
||||
stroke-width="5"
|
||||
transform="translate(1, 1)"></path>
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box highcharts-shadow"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="none" stroke="#000000"
|
||||
stroke-opacity="0.09999999999999999"
|
||||
stroke-width="3"
|
||||
transform="translate(1, 1)"></path>
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box highcharts-shadow"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="none" stroke="#000000"
|
||||
stroke-opacity="0.15" stroke-width="1"
|
||||
transform="translate(1, 1)"></path>
|
||||
<path
|
||||
class="highcharts-label-box highcharts-tooltip-box"
|
||||
d="M 3.5 0.5 L 130.5 0.5 C 133.5 0.5 133.5 0.5 133.5 3.5 L 133.5 31.5 C 133.5 34.5 133.5 34.5 130.5 34.5 L 3.5 34.5 C 0.5 34.5 0.5 34.5 0.5 31.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"
|
||||
fill="rgba(247,247,247,0.85)"
|
||||
stroke="#0099C6" stroke-width="1">
|
||||
</path>
|
||||
<text data-z-index="1"
|
||||
style="font-size:12px;color:#333333;cursor:default;fill:#333333;"
|
||||
x="8" y="20">
|
||||
<tspan style="font-weight:bold">world:
|
||||
</tspan>
|
||||
<tspan dx="0"> 3s (100.00%)</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<script>var worldPieSession15407139399600series = {
|
||||
name: 'World Playtime',
|
||||
colorByPoint: true,
|
||||
data: [{
|
||||
name: 'world',
|
||||
y: 3947,
|
||||
color: "#0099C6",
|
||||
drilldown: 'world'
|
||||
}]
|
||||
};
|
||||
var worldPieSession15407139399600gmseries = [{
|
||||
name: 'world',
|
||||
id: 'world',
|
||||
colors: gmPieColors,
|
||||
data: [['SURVIVAL', 0], ['SPECTATOR', 0], ['CREATIVE', 3947], ['ADVENTURE', 0]]
|
||||
}];</script>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- End of Most recent sessions -->
|
||||
@ -1301,6 +881,7 @@
|
||||
jsonRequest("../v1/player?player=${playerName}", function (json, error) {
|
||||
loadPlayerOverviewValues(json, error);
|
||||
loadSessionAccordion(json, error);
|
||||
loadServerAccordion(json, error);
|
||||
loadPlayerKills(json, error);
|
||||
loadPlayerDeaths(json, error);
|
||||
loadPvPPvEValues(json, error);
|
||||
|
Loading…
Reference in New Issue
Block a user