mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-03 05:51:28 +01:00
Enabled React frontend by default
Added Plugin.Use_Legacy_Frontend to help migrating html customizations to new version
This commit is contained in:
parent
b92e886a39
commit
2a3d3bbbc9
@ -86,7 +86,7 @@ public class ExportScheduler extends PluginRunnable {
|
||||
}
|
||||
|
||||
private void scheduleReactExport() {
|
||||
if (config.isFalse(PluginSettings.FRONTEND_BETA) ||
|
||||
if (config.isTrue(PluginSettings.LEGACY_FRONTEND) ||
|
||||
config.isFalse(ExportSettings.SERVER_PAGE) &&
|
||||
config.isFalse(ExportSettings.PLAYER_PAGES) &&
|
||||
config.isFalse(ExportSettings.PLAYERS_PAGE)) {return;}
|
||||
|
@ -96,7 +96,7 @@ public class NetworkPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportHtml(ExportPaths exportPaths, Path toDirectory) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
Path to = toDirectory
|
||||
.resolve("network")
|
||||
@ -133,7 +133,7 @@ public class NetworkPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportReactRedirects(Path toDirectory) throws IOException {
|
||||
if (config.isFalse(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isTrue(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
exportReactRedirects(toDirectory, files, config, getRedirections());
|
||||
}
|
||||
@ -207,7 +207,7 @@ public class NetworkPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportRequiredResources(ExportPaths exportPaths, Path toDirectory) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
exportResources(exportPaths, toDirectory,
|
||||
"./img/Flaticon_circle.png",
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.djrapitops.plan.delivery.export;
|
||||
|
||||
import com.djrapitops.plan.delivery.domain.container.PlayerContainer;
|
||||
import com.djrapitops.plan.delivery.rendering.pages.Page;
|
||||
import com.djrapitops.plan.delivery.rendering.pages.PageFactory;
|
||||
import com.djrapitops.plan.delivery.web.ResourceService;
|
||||
@ -31,6 +32,7 @@ import com.djrapitops.plan.settings.theme.Theme;
|
||||
import com.djrapitops.plan.storage.database.DBSystem;
|
||||
import com.djrapitops.plan.storage.database.Database;
|
||||
import com.djrapitops.plan.storage.database.queries.PlayerFetchQueries;
|
||||
import com.djrapitops.plan.storage.database.queries.containers.ContainerFetchQueries;
|
||||
import com.djrapitops.plan.storage.file.PlanFiles;
|
||||
import com.djrapitops.plan.storage.file.Resource;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -114,12 +116,14 @@ public class PlayerPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportHtml(ExportPaths exportPaths, Path playerDirectory, UUID playerUUID) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
Path to = playerDirectory.resolve("index.html");
|
||||
|
||||
try {
|
||||
Page page = pageFactory.playerPage(playerUUID);
|
||||
Database db = dbSystem.getDatabase();
|
||||
PlayerContainer player = db.query(ContainerFetchQueries.fetchPlayerContainer(playerUUID));
|
||||
Page page = pageFactory.playerPage(player);
|
||||
export(to, exportPaths.resolveExportPaths(page.toHtml()));
|
||||
} catch (IllegalStateException notFound) {
|
||||
throw new NotFoundException(notFound.getMessage());
|
||||
@ -127,7 +131,7 @@ public class PlayerPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportReactRedirects(Path toDirectory, UUID playerUUID) throws IOException {
|
||||
if (config.isFalse(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isTrue(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
exportReactRedirects(toDirectory, files, config, getRedirections(playerUUID));
|
||||
}
|
||||
@ -160,7 +164,7 @@ public class PlayerPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportRequiredResources(ExportPaths exportPaths, Path toDirectory) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
// Style
|
||||
exportResources(exportPaths, toDirectory,
|
||||
|
@ -93,7 +93,7 @@ public class PlayersPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportHtml(Path toDirectory) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
Path to = toDirectory
|
||||
.resolve("players")
|
||||
@ -116,7 +116,7 @@ public class PlayersPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportReactRedirects(Path toDirectory) throws IOException {
|
||||
if (config.isFalse(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isTrue(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
String[] redirections = {"players"};
|
||||
exportReactRedirects(toDirectory, files, config, redirections);
|
||||
@ -149,7 +149,7 @@ public class PlayersPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportRequiredResources(Path toDirectory) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
// Style
|
||||
exportResources(toDirectory,
|
||||
|
@ -105,7 +105,7 @@ public class ServerPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportHtml(Path toDirectory, Server server) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
ServerUUID serverUUID = server.getUuid();
|
||||
Path to = toDirectory
|
||||
@ -150,7 +150,7 @@ public class ServerPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportReactRedirects(Path toDirectory, ServerUUID serverUUID) throws IOException {
|
||||
if (config.isFalse(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isTrue(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
exportReactRedirects(toDirectory, files, config, getRedirections(serverUUID));
|
||||
}
|
||||
@ -231,7 +231,7 @@ public class ServerPageExporter extends FileExporter {
|
||||
}
|
||||
|
||||
private void exportRequiredResources(Path toDirectory) throws IOException {
|
||||
if (config.isTrue(PluginSettings.FRONTEND_BETA)) return;
|
||||
if (config.isFalse(PluginSettings.LEGACY_FRONTEND)) return;
|
||||
|
||||
// Style
|
||||
exportResources(toDirectory,
|
||||
|
@ -36,7 +36,6 @@ import com.djrapitops.plan.settings.locale.Locale;
|
||||
import com.djrapitops.plan.settings.theme.Theme;
|
||||
import com.djrapitops.plan.storage.database.DBSystem;
|
||||
import com.djrapitops.plan.storage.database.Database;
|
||||
import com.djrapitops.plan.storage.database.queries.containers.ContainerFetchQueries;
|
||||
import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
|
||||
import com.djrapitops.plan.storage.file.PlanFiles;
|
||||
import com.djrapitops.plan.storage.file.PublicHtmlFiles;
|
||||
@ -100,7 +99,7 @@ public class PageFactory {
|
||||
}
|
||||
|
||||
public Page playersPage() throws IOException {
|
||||
if (config.get().isTrue(PluginSettings.FRONTEND_BETA)) {
|
||||
if (config.get().isFalse(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return reactPage();
|
||||
}
|
||||
|
||||
@ -138,7 +137,7 @@ public class PageFactory {
|
||||
Server server = dbSystem.get().getDatabase().query(ServerQueries.fetchServerMatchingIdentifier(serverUUID))
|
||||
.orElseThrow(() -> new NotFoundException("Server not found in the database"));
|
||||
|
||||
if (config.get().isTrue(PluginSettings.FRONTEND_BETA)) {
|
||||
if (config.get().isFalse(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return reactPage();
|
||||
}
|
||||
|
||||
@ -157,11 +156,8 @@ public class PageFactory {
|
||||
);
|
||||
}
|
||||
|
||||
public Page playerPage(UUID playerUUID) throws IOException {
|
||||
Database db = dbSystem.get().getDatabase();
|
||||
PlayerContainer player = db.query(ContainerFetchQueries.fetchPlayerContainer(playerUUID));
|
||||
|
||||
if (config.get().isTrue(PluginSettings.FRONTEND_BETA)) {
|
||||
public Page playerPage(PlayerContainer player) throws IOException {
|
||||
if (config.get().isFalse(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return reactPage();
|
||||
}
|
||||
|
||||
@ -211,7 +207,7 @@ public class PageFactory {
|
||||
}
|
||||
|
||||
public Page networkPage() throws IOException {
|
||||
if (config.get().isTrue(PluginSettings.FRONTEND_BETA)) {
|
||||
if (config.get().isFalse(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return reactPage();
|
||||
}
|
||||
|
||||
@ -272,7 +268,7 @@ public class PageFactory {
|
||||
}
|
||||
|
||||
public Page loginPage() throws IOException {
|
||||
if (config.get().isTrue(PluginSettings.FRONTEND_BETA)) {
|
||||
if (config.get().isFalse(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return reactPage();
|
||||
}
|
||||
|
||||
@ -280,7 +276,7 @@ public class PageFactory {
|
||||
}
|
||||
|
||||
public Page registerPage() throws IOException {
|
||||
if (config.get().isTrue(PluginSettings.FRONTEND_BETA)) {
|
||||
if (config.get().isFalse(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return reactPage();
|
||||
}
|
||||
|
||||
@ -288,7 +284,7 @@ public class PageFactory {
|
||||
}
|
||||
|
||||
public Page queryPage() throws IOException {
|
||||
if (config.get().isTrue(PluginSettings.FRONTEND_BETA)) {
|
||||
if (config.get().isFalse(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return reactPage();
|
||||
}
|
||||
return new QueryPage(
|
||||
|
@ -17,6 +17,7 @@
|
||||
package com.djrapitops.plan.delivery.webserver;
|
||||
|
||||
import com.djrapitops.plan.delivery.domain.container.PlayerContainer;
|
||||
import com.djrapitops.plan.delivery.domain.keys.PlayerKeys;
|
||||
import com.djrapitops.plan.delivery.formatting.Formatter;
|
||||
import com.djrapitops.plan.delivery.formatting.Formatters;
|
||||
import com.djrapitops.plan.delivery.rendering.html.icon.Family;
|
||||
@ -127,6 +128,10 @@ public class ResponseFactory {
|
||||
}
|
||||
|
||||
private Response forPage(@Untrusted Request request, Page page) {
|
||||
return forPage(request, page, 200);
|
||||
}
|
||||
|
||||
private Response forPage(@Untrusted Request request, Page page, int responseCode) {
|
||||
long modified = page.lastModified();
|
||||
Optional<Long> etag = Identifiers.getEtag(request);
|
||||
|
||||
@ -135,6 +140,7 @@ public class ResponseFactory {
|
||||
}
|
||||
|
||||
return Response.builder()
|
||||
.setStatus(responseCode)
|
||||
.setMimeType(MimeType.HTML)
|
||||
.setContent(page.toHtml())
|
||||
.setHeader(HttpHeader.CACHE_CONTROL.asString(), CacheStrategy.CHECK_ETAG)
|
||||
@ -185,7 +191,7 @@ public class ResponseFactory {
|
||||
}
|
||||
|
||||
private Response getCachedOrNew(long modified, String fileName, Function<String, Response> newResponseFunction) {
|
||||
WebResource resource = config.isTrue(PluginSettings.FRONTEND_BETA) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
WebResource resource = config.isFalse(PluginSettings.LEGACY_FRONTEND) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
Optional<Long> lastModified = resource.getLastModified();
|
||||
if (lastModified.isPresent() && modified == lastModified.get()) {
|
||||
return browserCachedNotChangedResponse();
|
||||
@ -234,7 +240,7 @@ public class ResponseFactory {
|
||||
|
||||
public Response javaScriptResponse(@Untrusted String fileName) {
|
||||
try {
|
||||
WebResource resource = config.isTrue(PluginSettings.FRONTEND_BETA) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
WebResource resource = config.isFalse(PluginSettings.LEGACY_FRONTEND) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
String content = UnaryChain.of(resource.asString())
|
||||
.chain(this::replaceMainAddressPlaceholder)
|
||||
.chain(theme::replaceThemeColors)
|
||||
@ -284,7 +290,7 @@ public class ResponseFactory {
|
||||
|
||||
public Response cssResponse(@Untrusted String fileName) {
|
||||
try {
|
||||
WebResource resource = config.isTrue(PluginSettings.FRONTEND_BETA) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
WebResource resource = config.isFalse(PluginSettings.LEGACY_FRONTEND) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
String content = UnaryChain.of(resource.asString())
|
||||
.chain(theme::replaceThemeColors)
|
||||
.chain(contents -> StringUtils.replace(contents, "/static", getBasePath() + "/static"))
|
||||
@ -314,7 +320,7 @@ public class ResponseFactory {
|
||||
|
||||
public Response imageResponse(@Untrusted String fileName) {
|
||||
try {
|
||||
WebResource resource = config.isTrue(PluginSettings.FRONTEND_BETA) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
WebResource resource = config.isFalse(PluginSettings.LEGACY_FRONTEND) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
ResponseBuilder responseBuilder = Response.builder()
|
||||
.setMimeType(MimeType.IMAGE)
|
||||
.setContent(resource)
|
||||
@ -350,7 +356,7 @@ public class ResponseFactory {
|
||||
type = MimeType.FONT_BYTESTREAM;
|
||||
}
|
||||
try {
|
||||
WebResource resource = config.isTrue(PluginSettings.FRONTEND_BETA) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
WebResource resource = config.isFalse(PluginSettings.LEGACY_FRONTEND) ? getPublicOrJarResource(fileName) : getResource(fileName);
|
||||
ResponseBuilder responseBuilder = Response.builder()
|
||||
.setMimeType(type)
|
||||
.setContent(resource);
|
||||
@ -514,8 +520,18 @@ public class ResponseFactory {
|
||||
|
||||
public Response playerPageResponse(@Untrusted Request request, UUID playerUUID) {
|
||||
try {
|
||||
return forPage(request, pageFactory.playerPage(playerUUID));
|
||||
} catch (IllegalStateException e) {
|
||||
Database db = dbSystem.getDatabase();
|
||||
PlayerContainer player = db.query(ContainerFetchQueries.fetchPlayerContainer(playerUUID));
|
||||
if (player.getValue(PlayerKeys.REGISTERED).isPresent()) {
|
||||
return forPage(request, pageFactory.playerPage(player));
|
||||
} else {
|
||||
if (config.isTrue(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return playerNotFound404();
|
||||
} else {
|
||||
return forPage(request, pageFactory.reactPage(), 404);
|
||||
}
|
||||
}
|
||||
} catch (IllegalStateException notFoundLegacy) {
|
||||
return playerNotFound404();
|
||||
} catch (IOException e) {
|
||||
return forInternalError(e, "Failed to generate player page");
|
||||
|
@ -95,7 +95,7 @@ public class PlayerPageResolver implements Resolver {
|
||||
return responseFactory.rawPlayerPageResponse(playerUUID);
|
||||
}
|
||||
|
||||
if (path.getPart(2).isPresent() && config.isFalse(PluginSettings.FRONTEND_BETA)) {
|
||||
if (path.getPart(2).isPresent() && config.isTrue(PluginSettings.LEGACY_FRONTEND)) {
|
||||
// Redirect /player/{uuid/name}/ to /player/{uuid}
|
||||
return responseFactory.redirectResponse("../" + Html.encodeToURL(playerUUID.toString()));
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class ResourceSettings {
|
||||
}
|
||||
|
||||
public boolean shouldBeCustomized(String plugin, @Untrusted String fileName) {
|
||||
if (config.isTrue(CustomizedFileSettings.WEB_DEV_MODE) && config.isFalse(PluginSettings.FRONTEND_BETA)) {
|
||||
if (config.isTrue(CustomizedFileSettings.WEB_DEV_MODE) && config.isTrue(PluginSettings.LEGACY_FRONTEND)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -172,6 +172,8 @@ public class ConfigUpdater {
|
||||
new ConfigChange.MovedValue("Time.Delays.Ping_player_join_delay", "Time.Delays.Ping_player_join_delay.Time"),
|
||||
new ConfigChange.MovedValue("Time.Delays.Wait_for_DB_Transactions_on_disable", "Time.Delays.Wait_for_DB_Transactions_on_disable.Time"),
|
||||
new ConfigChange.MovedValue("Time.Thresholds.Activity_index.Playtime_threshold", "Time.Thresholds.Activity_index.Playtime_threshold.Time"),
|
||||
|
||||
new ConfigChange.Removed("Plugin.Frontend_BETA"),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class PluginSettings {
|
||||
public static final Setting<Boolean> CHECK_FOR_UPDATES = new BooleanSetting("Plugin.Update_notifications.Check_for_updates");
|
||||
public static final Setting<Boolean> NOTIFY_ABOUT_DEV_RELEASES = new BooleanSetting("Plugin.Update_notifications.Notify_about_DEV_releases");
|
||||
public static final Setting<Boolean> PROXY_COPY_CONFIG = new BooleanSetting("Plugin.Configuration.Allow_proxy_to_manage_settings");
|
||||
public static final Setting<Boolean> FRONTEND_BETA = new BooleanSetting("Plugin.Frontend_BETA");
|
||||
public static final Setting<Boolean> LEGACY_FRONTEND = new BooleanSetting("Plugin.Use_Legacy_Frontend");
|
||||
|
||||
private PluginSettings() {
|
||||
/* static variable class */
|
||||
|
@ -20,6 +20,7 @@ Plugin:
|
||||
Check_for_updates: true
|
||||
Notify_about_DEV_releases: false
|
||||
Frontend_BETA: false
|
||||
Use_Legacy_Frontend: false
|
||||
# -----------------------------------------------------
|
||||
# Supported databases: MySQL
|
||||
# -----------------------------------------------------
|
||||
|
@ -21,6 +21,7 @@ Plugin:
|
||||
Configuration:
|
||||
Allow_proxy_to_manage_settings: true
|
||||
Frontend_BETA: false
|
||||
Use_Legacy_Frontend: false
|
||||
# -----------------------------------------------------
|
||||
# Supported databases: SQLite, MySQL
|
||||
# -----------------------------------------------------
|
||||
|
@ -98,6 +98,7 @@ class ExportJSErrorRegressionTest {
|
||||
config.set(ExportSettings.PLAYER_PAGES, true);
|
||||
config.set(ExportSettings.SERVER_PAGE, true);
|
||||
config.set(ExportSettings.PLAYERS_PAGE, true);
|
||||
config.set(WebserverSettings.EXTERNAL_LINK, "http://" + nginx.getHost() + ":" + nginx.getMappedPort(80));
|
||||
|
||||
config.set(DisplaySettings.PLAYER_HEAD_IMG_URL, "data:image/png;base64,AA==");
|
||||
|
||||
@ -147,8 +148,7 @@ class ExportJSErrorRegressionTest {
|
||||
Collection<DynamicTest> exportedWebpageDoesNotHaveErrors(ChromeDriver driver) {
|
||||
String[] endpointsToTest = new String[]{
|
||||
"/player/" + TestConstants.PLAYER_ONE_UUID_STRING + "/index.html",
|
||||
// "/network/index.html",
|
||||
"/server/index.html",
|
||||
"/index.html",
|
||||
"/players/index.html"
|
||||
};
|
||||
|
||||
@ -161,6 +161,7 @@ class ExportJSErrorRegressionTest {
|
||||
|
||||
String address = nginx.getBaseUrl("http", 80).toURI().resolve(endpoint).toString();
|
||||
driver.get(address);
|
||||
Thread.sleep(250);
|
||||
|
||||
List<LogEntry> logs = new ArrayList<>();
|
||||
logs.addAll(driver.manage().logs().get(LogType.CLIENT).getAll());
|
||||
|
@ -21,7 +21,6 @@ import com.djrapitops.plan.identification.ServerUUID;
|
||||
import com.djrapitops.plan.settings.config.PlanConfig;
|
||||
import com.djrapitops.plan.settings.config.paths.DisplaySettings;
|
||||
import com.djrapitops.plan.settings.config.paths.ExportSettings;
|
||||
import com.djrapitops.plan.settings.config.paths.PluginSettings;
|
||||
import com.djrapitops.plan.settings.config.paths.WebserverSettings;
|
||||
import com.djrapitops.plan.storage.file.PlanFiles;
|
||||
import extension.FullSystemExtension;
|
||||
@ -70,7 +69,6 @@ class ExportRegressionTest {
|
||||
.waitingFor(new HttpWaitStrategy());
|
||||
webserver.start();
|
||||
|
||||
config.set(PluginSettings.FRONTEND_BETA, true);
|
||||
config.set(WebserverSettings.DISABLED, true);
|
||||
config.set(WebserverSettings.EXTERNAL_LINK, "http://" + webserver.getHost() + ":" + webserver.getMappedPort(8080));
|
||||
// Avoid accidentally DDoS:ing head image service during tests.
|
||||
|
@ -21,7 +21,6 @@ import com.djrapitops.plan.identification.ServerUUID;
|
||||
import com.djrapitops.plan.settings.config.PlanConfig;
|
||||
import com.djrapitops.plan.settings.config.paths.DisplaySettings;
|
||||
import com.djrapitops.plan.settings.config.paths.ExportSettings;
|
||||
import com.djrapitops.plan.settings.config.paths.PluginSettings;
|
||||
import com.djrapitops.plan.settings.config.paths.WebserverSettings;
|
||||
import com.djrapitops.plan.storage.file.PlanFiles;
|
||||
import extension.FullSystemExtension;
|
||||
@ -72,7 +71,6 @@ class ExportSubdirRegressionTest {
|
||||
.waitingFor(new HttpWaitStrategy());
|
||||
webserver.start();
|
||||
|
||||
config.set(PluginSettings.FRONTEND_BETA, true);
|
||||
config.set(WebserverSettings.DISABLED, true);
|
||||
config.set(WebserverSettings.EXTERNAL_LINK, "http://" + webserver.getHost() + ":" + webserver.getMappedPort(8080) + "/plan");
|
||||
// Avoid accidentally DDoS:ing head image service during tests.
|
||||
|
@ -22,7 +22,6 @@ import com.djrapitops.plan.gathering.domain.FinishedSession;
|
||||
import com.djrapitops.plan.identification.ServerUUID;
|
||||
import com.djrapitops.plan.settings.config.PlanConfig;
|
||||
import com.djrapitops.plan.settings.config.paths.DisplaySettings;
|
||||
import com.djrapitops.plan.settings.config.paths.PluginSettings;
|
||||
import com.djrapitops.plan.settings.config.paths.ProxySettings;
|
||||
import com.djrapitops.plan.settings.config.paths.WebserverSettings;
|
||||
import com.djrapitops.plan.settings.locale.LangCode;
|
||||
@ -84,7 +83,6 @@ class JSErrorRegressionTest {
|
||||
PlanConfig config = planSystem.getConfigSystem().getConfig();
|
||||
config.set(WebserverSettings.PORT, TEST_PORT_NUMBER);
|
||||
config.set(ProxySettings.IP, "localhost:" + TEST_PORT_NUMBER);
|
||||
config.set(PluginSettings.FRONTEND_BETA, true);
|
||||
|
||||
// Avoid accidentally DDoS:ing head image service during tests.
|
||||
config.set(DisplaySettings.PLAYER_HEAD_IMG_URL, "data:image/png;base64,AA==");
|
||||
|
@ -87,7 +87,6 @@ class ReverseProxyRegressionTest {
|
||||
TestResources.copyResourceToFile(nginxConfig.toFile(), new FileInputStream(TestResources.getTestResourceFile("nginx-reverse-proxy.conf", ReverseProxyRegressionTest.class)));
|
||||
webserver.start();
|
||||
|
||||
config.set(PluginSettings.FRONTEND_BETA, true);
|
||||
config.set(PluginSettings.SERVER_NAME, "TestServer");
|
||||
config.set(WebserverSettings.PORT, PLAN_PORT);
|
||||
config.set(WebserverSettings.LOG_ACCESS_TO_CONSOLE, true);
|
||||
|
Loading…
Reference in New Issue
Block a user