From d0c88ddd59e777f232db23595fc271cbea1aca86 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 19 Nov 2017 12:46:18 +0200 Subject: [PATCH] Added more debug for Bungee-Bukkit systems --- .../plan/systems/webserver/APIResponseHandler.java | 5 ++++- .../systems/webserver/response/DebugPageResponse.java | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/webserver/APIResponseHandler.java b/Plan/src/main/java/com/djrapitops/plan/systems/webserver/APIResponseHandler.java index 71febac30..1695489e7 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/webserver/APIResponseHandler.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/webserver/APIResponseHandler.java @@ -38,9 +38,12 @@ public class APIResponseHandler { String target = request.getTarget(); String[] args = target.split("/"); - if ("/favicon.ico".equals(target)) { + if ("/favicon.ico".equalsIgnoreCase(target)) { return PageCache.loadPage("Redirect: favicon", () -> new RedirectResponse("https://puu.sh/tK0KL/6aa2ba141b.ico")); } + if ("/debug".equalsIgnoreCase(target)) { + return new DebugPageResponse(); + } if (target.endsWith(".css")) { return PageCache.loadPage(target + "css", () -> new CSSResponse(target)); } diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/webserver/response/DebugPageResponse.java b/Plan/src/main/java/com/djrapitops/plan/systems/webserver/response/DebugPageResponse.java index 54a9e45ea..3d03e9e8a 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/webserver/response/DebugPageResponse.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/webserver/response/DebugPageResponse.java @@ -105,6 +105,15 @@ public class DebugPageResponse extends ErrorResponse { Collection online = serverInfoManager.getOnlineBukkitServers(); Collection bukkitServers = serverInfoManager.getBukkitServers(); + if (!bukkitServers.isEmpty()) { + content.append("

If your issue is about Bungee-Bukkit connection relations, please include the following debug information of available servers as well: "); + for (ServerInfo info : bukkitServers) { + String link = Html.LINK.parse(info.getWebAddress() + "/debug", info.getWebAddress() + "/debug"); + content.append(link).append("
"); + } + content.append("

"); + } + content.append("
### Bungee Configuration
"); content.append("Server name | Online | Address | UUID
")