mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-02 14:37:45 +01:00
Changed back links /server -> /server/
Also for /network -> /network/ This was causing some issues with relative links when Plan was in subdirectory eg address/plan/server would direct requests to address/v1/ instead of address/plan/v1/ Affects issues: - Fixed #1210
This commit is contained in:
parent
3d3c7289bb
commit
304d8da86b
@ -68,7 +68,7 @@ public class ListPlayersCommand extends CommandNode {
|
||||
|
||||
// Link
|
||||
String address = PlanSystem.getMainAddress(webServer, dbSystem);
|
||||
String url = address + "/players/";
|
||||
String url = address + "/players";
|
||||
String linkPrefix = locale.getString(CommandLang.LINK_PREFIX);
|
||||
boolean console = !CommandUtils.isPlayer(sender);
|
||||
if (console) {
|
||||
|
@ -82,8 +82,8 @@ public class PlayerPageExporter extends FileExporter {
|
||||
if (dbState == Database.State.CLOSED || dbState == Database.State.CLOSING) return;
|
||||
if (!dbSystem.getDatabase().query(PlayerFetchQueries.isPlayerRegistered(playerUUID))) return;
|
||||
|
||||
exportPaths.put("../network", toRelativePathFromRoot("network"));
|
||||
exportPaths.put("../server", toRelativePathFromRoot("server"));
|
||||
exportPaths.put("../network/", toRelativePathFromRoot("network"));
|
||||
exportPaths.put("../server/", toRelativePathFromRoot("server"));
|
||||
exportRequiredResources(toDirectory);
|
||||
|
||||
Path playerDirectory = toDirectory.resolve("player/" + toFileName(playerName));
|
||||
|
@ -85,7 +85,7 @@ public class ServerPageExporter extends FileExporter {
|
||||
Database.State dbState = dbSystem.getDatabase().getState();
|
||||
if (dbState == Database.State.CLOSED || dbState == Database.State.CLOSING) return;
|
||||
|
||||
exportPaths.put("../network", toRelativePathFromRoot("network"));
|
||||
exportPaths.put("../network/", toRelativePathFromRoot("network"));
|
||||
exportRequiredResources(toDirectory);
|
||||
exportJSON(toDirectory, server);
|
||||
exportHtml(toDirectory, server);
|
||||
|
@ -52,13 +52,13 @@ public enum Html {
|
||||
LINK("<a class=\"link\" href=\"${0}\">${1}</a>"),
|
||||
LINK_EXTERNAL("<a class=\"link\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"${0}\">${1}</a>"),
|
||||
|
||||
BACK_BUTTON_NETWORK("<a class=\"btn bg-plan btn-icon-split\" href=\"../network\">" +
|
||||
BACK_BUTTON_NETWORK("<a class=\"btn bg-plan btn-icon-split\" href=\"../network/\">" +
|
||||
"<span class=\"icon text-white-50\">" +
|
||||
"<i class=\"fas fa-fw fa-arrow-left\"></i><i class=\"fas fa-fw fa-cloud\"></i>" +
|
||||
"</span>" +
|
||||
"<span class=\"text\">Network page</span>" +
|
||||
"</a>"),
|
||||
BACK_BUTTON_SERVER("<a class=\"btn bg-plan btn-icon-split\" href=\"../server\">" +
|
||||
BACK_BUTTON_SERVER("<a class=\"btn bg-plan btn-icon-split\" href=\"../server/\">" +
|
||||
"<span class=\"icon text-white-50\">" +
|
||||
"<i class=\"fas fa-fw fa-arrow-left\"></i><i class=\"fas fa-fw fa-server\"></i>" +
|
||||
"</span>" +
|
||||
|
@ -283,7 +283,7 @@
|
||||
|
||||
<script>
|
||||
try {
|
||||
jsonRequest("../v1/players", function (playersTableJson, error) {
|
||||
jsonRequest("./v1/players", function (playersTableJson, error) {
|
||||
if (playersTableJson) {
|
||||
$('.player-table').DataTable({
|
||||
responsive: true,
|
||||
|
Loading…
Reference in New Issue
Block a user