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 f8e927dae..9ca627086 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 @@ -33,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; import java.util.stream.Collectors; +import main.java.com.djrapitops.plan.utilities.html.graphs.ServerPreferencePieCreator; /** * Used for parsing Inspect page out of database data and the html. @@ -79,7 +80,7 @@ public class InspectPageParser extends PageParser { addValue("kickCount", timesKicked); Map playtimeByServer = sessionsTable.getPlaytimeByServer(uuid); - // TODO Server preference pie + addValue("serverPieSeries", ServerPreferencePieCreator.createSeriesData(playtimeByServer)); List geolocations = db.getIpsTable().getGeolocations(uuid); List nicknames = db.getNicknamesTable().getNicknames(uuid).stream() @@ -193,5 +194,4 @@ public class InspectPageParser extends PageParser { addValue("playerClassification", HtmlStructure.separateWithDots(active, banned, op)); } - -} \ No newline at end of file +} diff --git a/Plan/src/main/resources/html/player.html b/Plan/src/main/resources/html/player.html index b20c8f1de..dfa9c6aec 100644 --- a/Plan/src/main/resources/html/player.html +++ b/Plan/src/main/resources/html/player.html @@ -199,11 +199,13 @@ var serverSeries = { name:'Server Playtime', colorByPoint:true, + colors: ${serverPieColors}, data: ${serverPieSeries} } var worldSeries = { name:'World Playtime', colorByPoint:true, + colors: ${worldPieColors}, data: ${worldPieSeries} }; var gmSeries = ${gmSeries}; diff --git a/Plan/src/main/resources/html/server.html b/Plan/src/main/resources/html/server.html index 793479693..ceb5fb587 100644 --- a/Plan/src/main/resources/html/server.html +++ b/Plan/src/main/resources/html/server.html @@ -409,6 +409,7 @@ var activitySeries = { name: 'Players', colorByPoint: true, + colors: ${activityPieColors}, data: [{ name: 'Active', y: ${active} @@ -428,6 +429,7 @@ var worldSeries = { name: 'World Playtime', colorByPoint: true, + colors: ${worldPieColors}, data: ${worldSeries} }; var gmSeries = ${gmSeries};