From 60257a30047b50ac8a670493f101de75c28c14a7 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Fri, 19 Jan 2018 17:18:51 +0200 Subject: [PATCH] Implementation to WebServer for the new InfoRequest system --- .../databases/operation/CheckOperations.java | 6 +- .../system/info/connection/ConnectionIn.java | 68 ++++++++++++++++++- .../info/connection/ConnectionSystem.java | 14 +++- .../request/CacheAnalysisPageRequest.java | 1 + .../info/request/CacheInspectPageRequest.java | 1 + .../CacheNetworkPageContentRequest.java | 11 +++ .../request/GenerateAnalysisPageRequest.java | 9 +++ .../request/GenerateInspectPageRequest.java | 13 +++- .../info/request/RequestSetupRequest.java | 28 ++++++++ .../system/webserver/ResponseHandler.java | 4 +- .../pages/InfoRequestPageHandler.java | 40 +++++++++++ .../pages}/parsing/AnalysisPage.java | 2 +- .../webserver/pages}/parsing/InspectPage.java | 2 +- .../webserver/pages}/parsing/NetworkPage.java | 2 +- .../webserver/pages}/parsing/Page.java | 2 +- .../plan/system/webserver/webapi/WebAPI.java | 2 +- .../info/BukkitInformationManager.java | 4 +- .../info/BungeeInformationManager.java | 2 +- 18 files changed, 193 insertions(+), 18 deletions(-) create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/info/request/RequestSetupRequest.java create mode 100644 Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/InfoRequestPageHandler.java rename Plan/src/main/java/com/djrapitops/plan/{systems/info => system/webserver/pages}/parsing/AnalysisPage.java (96%) rename Plan/src/main/java/com/djrapitops/plan/{systems/info => system/webserver/pages}/parsing/InspectPage.java (99%) rename Plan/src/main/java/com/djrapitops/plan/{systems/info => system/webserver/pages}/parsing/NetworkPage.java (98%) rename Plan/src/main/java/com/djrapitops/plan/{systems/info => system/webserver/pages}/parsing/Page.java (93%) diff --git a/Plan/src/main/java/com/djrapitops/plan/system/database/databases/operation/CheckOperations.java b/Plan/src/main/java/com/djrapitops/plan/system/database/databases/operation/CheckOperations.java index d24f5f8bc..c58e4f3b2 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/database/databases/operation/CheckOperations.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/database/databases/operation/CheckOperations.java @@ -1,7 +1,7 @@ package com.djrapitops.plan.system.database.databases.operation; import com.djrapitops.plan.api.exceptions.database.DBException; -import com.djrapitops.plan.system.PlanSystem; +import com.djrapitops.plan.system.info.server.ServerInfo; import java.util.UUID; @@ -14,6 +14,8 @@ public interface CheckOperations { boolean doesWebUserExists(String username) throws DBException; default boolean isPlayerRegisteredOnThisServer(UUID player) throws DBException { - return isPlayerRegistered(player, PlanSystem.getInstance().getServerInfo().getUuid()); + return isPlayerRegistered(player, ServerInfo.getServerUUID()); } + + boolean isServerInDatabase(UUID serverUUID) throws DBException; } diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionIn.java b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionIn.java index 2b7b942bf..12f43406f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionIn.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionIn.java @@ -1,22 +1,84 @@ package com.djrapitops.plan.system.info.connection; -import com.djrapitops.plan.api.exceptions.connection.WebException; +import com.djrapitops.plan.api.exceptions.connection.*; +import com.djrapitops.plan.api.exceptions.database.DBException; +import com.djrapitops.plan.system.database.databases.Database; import com.djrapitops.plan.system.info.request.InfoRequest; +import com.djrapitops.plan.system.info.request.RequestSetupRequest; +import com.djrapitops.plan.system.webserver.Request; import com.djrapitops.plan.system.webserver.response.Response; +import com.djrapitops.plan.utilities.NullCheck; +import com.djrapitops.plugin.utilities.Verify; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; import java.util.Map; +import java.util.UUID; +import java.util.stream.Collectors; public class ConnectionIn { - + private final Map variables; private final InfoRequest infoRequest; - public ConnectionIn(Map variables, InfoRequest infoRequest) { + public ConnectionIn(Request httpRequest, InfoRequest infoRequest) throws WebException { + Verify.nullCheck(httpRequest, infoRequest); + + Map variables = readVariables(httpRequest); + checkAuthentication(variables); + this.variables = variables; this.infoRequest = infoRequest; } + private void checkAuthentication(Map variables) throws WebException { + String sender = variables.get("sender"); + NullCheck.check(sender, new BadRequestException("Sender ('sender') was not included.")); + UUID serverUUID = UUID.fromString(sender); + + try { + if (!Database.getActive().check().isServerInDatabase(serverUUID)) { + if (infoRequest instanceof RequestSetupRequest) { + return; + } + throw new UnauthorizedServerException(sender + "Sender was not found from database"); + } + } catch (DBException e) { + throw new TransferDatabaseException(e); + } + } + + private Map readVariables(Request request) throws WebException { + String requestBody = readRequestBody(request.getRequestBody()); + String[] variables = requestBody.split(";&variable;"); + + return Arrays.stream(variables) + .map(variable -> variable.split("=", 2)) + .filter(splitVariables -> splitVariables.length == 2) + .collect(Collectors.toMap(splitVariables -> splitVariables[0], splitVariables -> splitVariables[1], (a, b) -> b)); + } + public Response handleRequest() throws WebException { return infoRequest.handleRequest(variables); } + + private String readRequestBody(InputStream in) throws WebFailException { + try (ByteArrayOutputStream out = new ByteArrayOutputStream()) { + byte[] bytes; + + byte[] buf = new byte[4096]; + for (int n = in.read(buf); n > 0; n = in.read(buf)) { + out.write(buf, 0, n); + } + + bytes = out.toByteArray(); + + return new String(bytes, StandardCharsets.UTF_8); + } catch (IOException e) { + throw new WebFailException("Exception while reading Request.", e); + } + } } diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionSystem.java index 067987c57..2264c4f94 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionSystem.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionSystem.java @@ -8,8 +8,7 @@ import com.djrapitops.plan.api.exceptions.connection.NoServersException; import com.djrapitops.plan.api.exceptions.connection.WebException; import com.djrapitops.plan.system.SubSystem; import com.djrapitops.plan.system.info.InfoSystem; -import com.djrapitops.plan.system.info.request.CacheInspectPageRequest; -import com.djrapitops.plan.system.info.request.InfoRequest; +import com.djrapitops.plan.system.info.request.*; import com.djrapitops.plan.system.info.server.Server; import com.djrapitops.plan.utilities.NullCheck; @@ -44,14 +43,23 @@ public abstract class ConnectionSystem implements SubSystem { return connectionSystem; } + public InfoRequest getInfoRequest(String name) { + return dataRequests.get(name.toLowerCase()); + } + private Map loadDataRequests() { Map requests = new HashMap<>(); putRequest(requests, CacheInspectPageRequest.createHandler()); + putRequest(requests, CacheAnalysisPageRequest.createHandler()); + putRequest(requests, CacheNetworkPageContentRequest.createHandler()); + + putRequest(requests, GenerateAnalysisPageRequest.createHandler()); + putRequest(requests, GenerateInspectPageRequest.createHandler()); return requests; } private void putRequest(Map requests, InfoRequest request) { - requests.put(request.getClass().getSimpleName(), request); + requests.put(request.getClass().getSimpleName().toLowerCase(), request); } protected abstract Server selectServerForRequest(InfoRequest infoRequest) throws NoServersException; diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheAnalysisPageRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheAnalysisPageRequest.java index 7599abbe1..1f287d4b3 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheAnalysisPageRequest.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheAnalysisPageRequest.java @@ -35,6 +35,7 @@ public class CacheAnalysisPageRequest implements InfoRequest { } public CacheAnalysisPageRequest(UUID serverUUID, String html) { + Verify.nullCheck(serverUUID, html); this.serverUUID = serverUUID; this.html = html; } diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java index fba44f50d..1e6355cd2 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java @@ -35,6 +35,7 @@ public class CacheInspectPageRequest implements InfoRequest { } public CacheInspectPageRequest(UUID player, String html) { + Verify.nullCheck(player, html); this.player = player; this.html = html; } diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheNetworkPageContentRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheNetworkPageContentRequest.java index c203705d9..8fcf91e5a 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheNetworkPageContentRequest.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheNetworkPageContentRequest.java @@ -14,6 +14,7 @@ import com.djrapitops.plan.system.webserver.response.Response; import com.djrapitops.plan.system.webserver.response.cache.PageId; import com.djrapitops.plan.system.webserver.response.cache.ResponseCache; import com.djrapitops.plan.system.webserver.response.pages.parts.NetworkPageContent; +import com.djrapitops.plugin.utilities.Verify; import java.util.Map; import java.util.UUID; @@ -29,10 +30,16 @@ public class CacheNetworkPageContentRequest implements InfoRequest { private final String html; public CacheNetworkPageContentRequest(UUID serverUUID, String html) { + Verify.nullCheck(serverUUID, html); this.serverUUID = serverUUID; this.html = html; } + private CacheNetworkPageContentRequest() { + serverUUID = null; + html = null; + } + @Override public void placeDataToDatabase() throws WebException { try { @@ -70,4 +77,8 @@ public class CacheNetworkPageContentRequest implements InfoRequest { return DefaultResponses.SUCCESS.get(); } + + public static CacheNetworkPageContentRequest createHandler() { + return new CacheNetworkPageContentRequest(); + } } \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateAnalysisPageRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateAnalysisPageRequest.java index fe788f461..ca8c49347 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateAnalysisPageRequest.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateAnalysisPageRequest.java @@ -11,6 +11,7 @@ import com.djrapitops.plan.system.info.server.ServerInfo; import com.djrapitops.plan.system.webserver.pages.DefaultResponses; import com.djrapitops.plan.system.webserver.response.Response; import com.djrapitops.plan.utilities.NullCheck; +import com.djrapitops.plugin.utilities.Verify; import java.util.Map; import java.util.UUID; @@ -23,9 +24,13 @@ import java.util.UUID; public class GenerateAnalysisPageRequest extends InfoRequestWithVariables { public GenerateAnalysisPageRequest(UUID serverUUID) { + Verify.nullCheck(serverUUID); variables.put("server", serverUUID.toString()); } + private GenerateAnalysisPageRequest() { + } + @Override public void placeDataToDatabase() { // No data required in a Generate request @@ -53,4 +58,8 @@ public class GenerateAnalysisPageRequest extends InfoRequestWithVariables { // TODO Perform Analysis & get HTML return null; } + + public static GenerateAnalysisPageRequest createHandler() { + return new GenerateAnalysisPageRequest(); + } } \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateInspectPageRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateInspectPageRequest.java index 648241687..a6e8c0a6f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateInspectPageRequest.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/GenerateInspectPageRequest.java @@ -12,9 +12,10 @@ import com.djrapitops.plan.api.exceptions.connection.WebFailException; import com.djrapitops.plan.api.exceptions.database.DBException; import com.djrapitops.plan.system.info.InfoSystem; import com.djrapitops.plan.system.webserver.pages.DefaultResponses; +import com.djrapitops.plan.system.webserver.pages.parsing.InspectPage; import com.djrapitops.plan.system.webserver.response.Response; -import com.djrapitops.plan.systems.info.parsing.InspectPage; import com.djrapitops.plan.utilities.NullCheck; +import com.djrapitops.plugin.utilities.Verify; import java.util.Map; import java.util.UUID; @@ -26,10 +27,18 @@ import java.util.UUID; */ public class GenerateInspectPageRequest extends InfoRequestWithVariables { + private GenerateInspectPageRequest() { + } + public GenerateInspectPageRequest(UUID uuid) { + Verify.nullCheck(uuid); variables.put("player", uuid.toString()); } + public static GenerateInspectPageRequest createHandler() { + return new GenerateInspectPageRequest(); + } + @Override public void placeDataToDatabase() { // No data required in a Generate request @@ -52,7 +61,9 @@ public class GenerateInspectPageRequest extends InfoRequestWithVariables { private String getHtml(UUID uuid) throws WebException { try { + return new InspectPage(uuid).toHtml(); + } catch (ParseException e) { Throwable cause = e.getCause(); if (cause instanceof DBException) { diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/RequestSetupRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/RequestSetupRequest.java new file mode 100644 index 000000000..64a9d089c --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/RequestSetupRequest.java @@ -0,0 +1,28 @@ +/* + * Licence is provided in the jar as license.yml also here: + * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml + */ +package com.djrapitops.plan.system.info.request; + +import com.djrapitops.plan.system.webserver.response.Response; + +import java.util.Map; + +/** + * InfoRequest for /plan m setup command. + * + * @author Rsl1122 + */ +// TODO +public class RequestSetupRequest extends InfoRequestWithVariables { + + @Override + public void placeDataToDatabase() { + // Not Required with setup request. + } + + @Override + public Response handleRequest(Map variables) { + return null; + } +} \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/ResponseHandler.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/ResponseHandler.java index 406b5d6f9..0fbf0e541 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/ResponseHandler.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/ResponseHandler.java @@ -48,7 +48,9 @@ public class ResponseHandler extends TreePageHandler { } public void registerWebAPIPages() { -// TODO WebAPIPageHandler + registerPage("api", new InfoRequestPageHandler()); + + // TODO Remove redundant comment after implementing replacements // private void registerWebAPIs() { // webAPI.registerNewAPI( // new AnalysisReadyWebAPI(), diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/InfoRequestPageHandler.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/InfoRequestPageHandler.java new file mode 100644 index 000000000..ded1fae51 --- /dev/null +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/InfoRequestPageHandler.java @@ -0,0 +1,40 @@ +/* + * Licence is provided in the jar as license.yml also here: + * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml + */ +package com.djrapitops.plan.system.webserver.pages; + +import com.djrapitops.plan.api.exceptions.connection.NotFoundException; +import com.djrapitops.plan.api.exceptions.connection.WebException; +import com.djrapitops.plan.system.info.connection.ConnectionIn; +import com.djrapitops.plan.system.info.connection.ConnectionSystem; +import com.djrapitops.plan.system.info.request.InfoRequest; +import com.djrapitops.plan.system.webserver.Request; +import com.djrapitops.plan.system.webserver.response.Response; +import com.djrapitops.plan.utilities.NullCheck; + +import java.util.List; + +/** + * PageHandler for /info/requestname pages. + *

+ * Used for answering info requests by other servers. + * + * @author Rsl1122 + */ +public class InfoRequestPageHandler extends PageHandler { + + @Override + public Response getResponse(Request request, List target) throws WebException { + if (target.isEmpty()) { + return DefaultResponses.NOT_FOUND.get(); + } + + String requestName = target.get(0); + InfoRequest infoRequest = ConnectionSystem.getInstance().getInfoRequest(requestName); + + NullCheck.check(infoRequest, new NotFoundException("Info Request has not been registered.")); + + return new ConnectionIn(request, infoRequest).handleRequest(); + } +} \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/AnalysisPage.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/AnalysisPage.java similarity index 96% rename from Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/AnalysisPage.java rename to Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/AnalysisPage.java index 5fab0f0b5..567cf2d7e 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/AnalysisPage.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/AnalysisPage.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.info.parsing; +package com.djrapitops.plan.system.webserver.pages.parsing; import com.djrapitops.plan.Plan; import com.djrapitops.plan.PlanBungee; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPage.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/InspectPage.java similarity index 99% rename from Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPage.java rename to Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/InspectPage.java index 6f2f6128d..5f55943b1 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPage.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/InspectPage.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.info.parsing; +package com.djrapitops.plan.system.webserver.pages.parsing; import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.api.exceptions.ParseException; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/NetworkPage.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/NetworkPage.java similarity index 98% rename from Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/NetworkPage.java rename to Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/NetworkPage.java index 10b0c82c2..5ec571e7a 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/NetworkPage.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/NetworkPage.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.info.parsing; +package com.djrapitops.plan.system.webserver.pages.parsing; import com.djrapitops.plan.PlanBungee; import com.djrapitops.plan.api.exceptions.ParseException; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/Page.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/Page.java similarity index 93% rename from Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/Page.java rename to Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/Page.java index 6fe13967e..427b64775 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/Page.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/parsing/Page.java @@ -2,7 +2,7 @@ * Licence is provided in the jar as license.yml also here: * https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml */ -package com.djrapitops.plan.systems.info.parsing; +package com.djrapitops.plan.system.webserver.pages.parsing; import com.djrapitops.plan.api.exceptions.ParseException; diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/WebAPI.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/WebAPI.java index 47be80f0e..7261b4035 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/WebAPI.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/webapi/WebAPI.java @@ -144,7 +144,7 @@ public abstract class WebAPI { case 403: throw new ForbiddenException(url.toString()); case 404: - throw new NotFoundException(); + throw new NotFoundException(""); case 500: throw new InternalErrorException(); default: diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java b/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java index 443b21d91..fd65773d8 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/info/BukkitInformationManager.java @@ -21,6 +21,8 @@ import com.djrapitops.plan.system.processing.processors.Processor; import com.djrapitops.plan.system.settings.Settings; import com.djrapitops.plan.system.webserver.WebServer; import com.djrapitops.plan.system.webserver.WebServerSystem; +import com.djrapitops.plan.system.webserver.pages.parsing.AnalysisPage; +import com.djrapitops.plan.system.webserver.pages.parsing.InspectPage; import com.djrapitops.plan.system.webserver.response.Response; import com.djrapitops.plan.system.webserver.response.cache.PageId; import com.djrapitops.plan.system.webserver.response.cache.ResponseCache; @@ -34,8 +36,6 @@ import com.djrapitops.plan.system.webserver.webapi.bukkit.AnalysisReadyWebAPI; import com.djrapitops.plan.system.webserver.webapi.bukkit.AnalyzeWebAPI; import com.djrapitops.plan.system.webserver.webapi.bukkit.RequestInspectPluginsTabBukkitWebAPI; import com.djrapitops.plan.system.webserver.webapi.bungee.*; -import com.djrapitops.plan.systems.info.parsing.AnalysisPage; -import com.djrapitops.plan.systems.info.parsing.InspectPage; import com.djrapitops.plan.utilities.MiscUtils; import com.djrapitops.plan.utilities.analysis.Analysis; import com.djrapitops.plan.utilities.file.export.HtmlExport; diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java b/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java index 2898853dd..0191f0e66 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java @@ -14,6 +14,7 @@ import com.djrapitops.plan.system.cache.DataCache; import com.djrapitops.plan.system.info.server.BungeeServerInfo; import com.djrapitops.plan.system.info.server.Server; import com.djrapitops.plan.system.settings.Settings; +import com.djrapitops.plan.system.webserver.pages.parsing.NetworkPage; import com.djrapitops.plan.system.webserver.response.Response; import com.djrapitops.plan.system.webserver.response.cache.PageId; import com.djrapitops.plan.system.webserver.response.cache.ResponseCache; @@ -27,7 +28,6 @@ import com.djrapitops.plan.system.webserver.webapi.bukkit.AnalyzeWebAPI; import com.djrapitops.plan.system.webserver.webapi.bukkit.InspectWebAPI; import com.djrapitops.plan.system.webserver.webapi.bukkit.IsOnlineWebAPI; import com.djrapitops.plan.system.webserver.webapi.bungee.RequestPluginsTabWebAPI; -import com.djrapitops.plan.systems.info.parsing.NetworkPage; import com.djrapitops.plan.utilities.file.export.HtmlExport; import com.djrapitops.plan.utilities.html.HtmlStructure; import com.djrapitops.plugin.api.utility.log.ErrorLogger;