mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-02 14:37:45 +01:00
Fixed /server, /player links in exported pages
This commit is contained in:
parent
9520f95f36
commit
d58d6d231e
@ -128,7 +128,10 @@ public class NetworkPageExporter extends FileExporter {
|
||||
|
||||
String jsonResourceName = toFileName(toJSONResourceName(resource)) + ".json";
|
||||
|
||||
export(toDirectory.resolve("data").resolve(jsonResourceName), found.getContent());
|
||||
export(toDirectory.resolve("data").resolve(jsonResourceName),
|
||||
// Replace ../server in urls to fix server page links
|
||||
StringUtils.replaceEach(found.getContent(), new String[]{"../server", "../player"}, new String[]{toRelativePathFromRoot("server"), toRelativePathFromRoot("player")})
|
||||
);
|
||||
exportPaths.put("../v1/" + resource, toRelativePathFromRoot("data/" + jsonResourceName));
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,10 @@ public class PlayersPageExporter extends FileExporter {
|
||||
|
||||
String jsonResourceName = toFileName(toJSONResourceName("players")) + ".json";
|
||||
|
||||
export(toDirectory.resolve("data").resolve(jsonResourceName), found.getContent());
|
||||
export(toDirectory.resolve("data").resolve(jsonResourceName),
|
||||
// Replace ../player in urls to fix player page links
|
||||
StringUtils.replace(found.getContent(), "../player", toRelativePathFromRoot("player"))
|
||||
);
|
||||
exportPaths.put("../v1/players", toRelativePathFromRoot("data/" + jsonResourceName));
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,10 @@ public class ServerPageExporter extends FileExporter {
|
||||
|
||||
String jsonResourceName = toFileName(toJSONResourceName(resource)) + ".json";
|
||||
|
||||
export(toDirectory.resolve("data").resolve(jsonResourceName), found.getContent());
|
||||
export(toDirectory.resolve("data").resolve(jsonResourceName),
|
||||
// Replace ../player in urls to fix player page links
|
||||
StringUtils.replace(found.getContent(), "../player", toRelativePathFromRoot("player"))
|
||||
);
|
||||
exportPaths.put("../v1/" + resource, toRelativePathFromRoot("data/" + jsonResourceName));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user