mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Fixed /server page on exported /network page
This commit is contained in:
parent
d58d6d231e
commit
2f32035845
@ -129,8 +129,8 @@ public class NetworkPageExporter extends FileExporter {
|
|||||||
String jsonResourceName = toFileName(toJSONResourceName(resource)) + ".json";
|
String jsonResourceName = toFileName(toJSONResourceName(resource)) + ".json";
|
||||||
|
|
||||||
export(toDirectory.resolve("data").resolve(jsonResourceName),
|
export(toDirectory.resolve("data").resolve(jsonResourceName),
|
||||||
// Replace ../server in urls to fix server page links
|
// Replace ../player in urls to fix player page links
|
||||||
StringUtils.replaceEach(found.getContent(), new String[]{"../server", "../player"}, new String[]{toRelativePathFromRoot("server"), toRelativePathFromRoot("player")})
|
StringUtils.replace(found.getContent(), "../player", toRelativePathFromRoot("player"))
|
||||||
);
|
);
|
||||||
exportPaths.put("../v1/" + resource, toRelativePathFromRoot("data/" + jsonResourceName));
|
exportPaths.put("../v1/" + resource, toRelativePathFromRoot("data/" + jsonResourceName));
|
||||||
}
|
}
|
||||||
@ -186,6 +186,9 @@ public class NetworkPageExporter extends FileExporter {
|
|||||||
Path to = toDirectory.resolve(resourceName);
|
Path to = toDirectory.resolve(resourceName);
|
||||||
if (resourceName.endsWith(".css")) {
|
if (resourceName.endsWith(".css")) {
|
||||||
export(to, theme.replaceThemeColors(resource.asString()));
|
export(to, theme.replaceThemeColors(resource.asString()));
|
||||||
|
} else if (resourceName.equalsIgnoreCase("js/network-values.js")) {
|
||||||
|
// Replace /server in urls to fix server page links
|
||||||
|
export(to, StringUtils.replace(resource.asString(), "server/", toRelativePathFromRoot("server") + '/'));
|
||||||
} else {
|
} else {
|
||||||
export(to, resource.asLines());
|
export(to, resource.asLines());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user