mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 00:51:25 +01:00
[Debt] Added thresholds to ActivityIndex methods
This required addition of PlanConfig in some places to obtain the values
This commit is contained in:
parent
6bb24c3903
commit
51e2d6fe91
@ -16,6 +16,8 @@ import com.djrapitops.plan.system.locale.lang.DeepHelpLang;
|
|||||||
import com.djrapitops.plan.system.locale.lang.GenericLang;
|
import com.djrapitops.plan.system.locale.lang.GenericLang;
|
||||||
import com.djrapitops.plan.system.processing.Processing;
|
import com.djrapitops.plan.system.processing.Processing;
|
||||||
import com.djrapitops.plan.system.settings.Permissions;
|
import com.djrapitops.plan.system.settings.Permissions;
|
||||||
|
import com.djrapitops.plan.system.settings.Settings;
|
||||||
|
import com.djrapitops.plan.system.settings.config.PlanConfig;
|
||||||
import com.djrapitops.plan.utilities.MiscUtils;
|
import com.djrapitops.plan.utilities.MiscUtils;
|
||||||
import com.djrapitops.plan.utilities.formatting.Formatter;
|
import com.djrapitops.plan.utilities.formatting.Formatter;
|
||||||
import com.djrapitops.plan.utilities.formatting.Formatters;
|
import com.djrapitops.plan.utilities.formatting.Formatters;
|
||||||
@ -44,6 +46,7 @@ public class QInspectCommand extends CommandNode {
|
|||||||
|
|
||||||
private final Locale locale;
|
private final Locale locale;
|
||||||
private final Database database;
|
private final Database database;
|
||||||
|
private final PlanConfig config;
|
||||||
private final Processing processing;
|
private final Processing processing;
|
||||||
private final Formatters formatters;
|
private final Formatters formatters;
|
||||||
private final UUIDUtility uuidUtility;
|
private final UUIDUtility uuidUtility;
|
||||||
@ -51,6 +54,7 @@ public class QInspectCommand extends CommandNode {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public QInspectCommand(
|
public QInspectCommand(
|
||||||
|
PlanConfig config,
|
||||||
Locale locale,
|
Locale locale,
|
||||||
Processing processing,
|
Processing processing,
|
||||||
Database database,
|
Database database,
|
||||||
@ -59,6 +63,7 @@ public class QInspectCommand extends CommandNode {
|
|||||||
ErrorHandler errorHandler
|
ErrorHandler errorHandler
|
||||||
) {
|
) {
|
||||||
super("qinspect", Permissions.QUICK_INSPECT.getPermission(), CommandType.PLAYER_OR_ARGS);
|
super("qinspect", Permissions.QUICK_INSPECT.getPermission(), CommandType.PLAYER_OR_ARGS);
|
||||||
|
this.config = config;
|
||||||
this.processing = processing;
|
this.processing = processing;
|
||||||
this.formatters = formatters;
|
this.formatters = formatters;
|
||||||
setArguments("<player>");
|
setArguments("<player>");
|
||||||
@ -115,7 +120,11 @@ public class QInspectCommand extends CommandNode {
|
|||||||
|
|
||||||
String playerName = player.getValue(PlayerKeys.NAME).orElse(locale.getString(GenericLang.UNKNOWN));
|
String playerName = player.getValue(PlayerKeys.NAME).orElse(locale.getString(GenericLang.UNKNOWN));
|
||||||
|
|
||||||
ActivityIndex activityIndex = player.getActivityIndex(now);
|
ActivityIndex activityIndex = player.getActivityIndex(
|
||||||
|
now,
|
||||||
|
config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD),
|
||||||
|
config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD)
|
||||||
|
);
|
||||||
Long registered = player.getValue(PlayerKeys.REGISTERED).orElse(0L);
|
Long registered = player.getValue(PlayerKeys.REGISTERED).orElse(0L);
|
||||||
Long lastSeen = player.getValue(PlayerKeys.LAST_SEEN).orElse(0L);
|
Long lastSeen = player.getValue(PlayerKeys.LAST_SEEN).orElse(0L);
|
||||||
List<GeoInfo> geoInfo = player.getValue(PlayerKeys.GEO_INFO).orElse(new ArrayList<>());
|
List<GeoInfo> geoInfo = player.getValue(PlayerKeys.GEO_INFO).orElse(new ArrayList<>());
|
||||||
|
@ -358,7 +358,7 @@ public class AnalysisContainer extends DataContainer {
|
|||||||
getUnsafe(AnalysisKeys.NEW_PLAYERS_PER_DAY)
|
getUnsafe(AnalysisKeys.NEW_PLAYERS_PER_DAY)
|
||||||
).toCalendarSeries());
|
).toCalendarSeries());
|
||||||
|
|
||||||
putSupplier(AnalysisKeys.ACTIVITY_DATA, () -> getUnsafe(AnalysisKeys.PLAYERS_MUTATOR).toActivityDataMap(getUnsafe(AnalysisKeys.ANALYSIS_TIME)));
|
putSupplier(AnalysisKeys.ACTIVITY_DATA, () -> getUnsafe(AnalysisKeys.PLAYERS_MUTATOR).toActivityDataMap(getUnsafe(AnalysisKeys.ANALYSIS_TIME), config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD), config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD)));
|
||||||
Key<StackGraph> activityStackGraph = new Key<>(StackGraph.class, "ACTIVITY_STACK_GRAPH");
|
Key<StackGraph> activityStackGraph = new Key<>(StackGraph.class, "ACTIVITY_STACK_GRAPH");
|
||||||
putSupplier(activityStackGraph, () -> graphs.stack().activityStackGraph(getUnsafe(AnalysisKeys.ACTIVITY_DATA)));
|
putSupplier(activityStackGraph, () -> graphs.stack().activityStackGraph(getUnsafe(AnalysisKeys.ACTIVITY_DATA)));
|
||||||
putSupplier(AnalysisKeys.ACTIVITY_STACK_CATEGORIES, () -> getUnsafe(activityStackGraph).toHighChartsLabels());
|
putSupplier(AnalysisKeys.ACTIVITY_STACK_CATEGORIES, () -> getUnsafe(activityStackGraph).toHighChartsLabels());
|
||||||
|
@ -117,7 +117,7 @@ public class NetworkContainer extends DataContainer {
|
|||||||
graphs.line().playersOnlineGraph(TPSMutator.forContainer(bungeeContainer)).toHighChartsSeries()
|
graphs.line().playersOnlineGraph(TPSMutator.forContainer(bungeeContainer)).toHighChartsSeries()
|
||||||
);
|
);
|
||||||
Key<StackGraph> activityStackGraph = new Key<>(StackGraph.class, "ACTIVITY_STACK_GRAPH");
|
Key<StackGraph> activityStackGraph = new Key<>(StackGraph.class, "ACTIVITY_STACK_GRAPH");
|
||||||
putSupplier(NetworkKeys.ACTIVITY_DATA, () -> getUnsafe(NetworkKeys.PLAYERS_MUTATOR).toActivityDataMap(getUnsafe(NetworkKeys.REFRESH_TIME)));
|
putSupplier(NetworkKeys.ACTIVITY_DATA, () -> getUnsafe(NetworkKeys.PLAYERS_MUTATOR).toActivityDataMap(getUnsafe(NetworkKeys.REFRESH_TIME), config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD), config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD)));
|
||||||
putSupplier(activityStackGraph, () -> graphs.stack().activityStackGraph(getUnsafe(NetworkKeys.ACTIVITY_DATA)));
|
putSupplier(activityStackGraph, () -> graphs.stack().activityStackGraph(getUnsafe(NetworkKeys.ACTIVITY_DATA)));
|
||||||
putSupplier(NetworkKeys.ACTIVITY_STACK_CATEGORIES, () -> getUnsafe(activityStackGraph).toHighChartsLabels());
|
putSupplier(NetworkKeys.ACTIVITY_STACK_CATEGORIES, () -> getUnsafe(activityStackGraph).toHighChartsLabels());
|
||||||
putSupplier(NetworkKeys.ACTIVITY_STACK_SERIES, () -> getUnsafe(activityStackGraph).toHighChartsSeries());
|
putSupplier(NetworkKeys.ACTIVITY_STACK_SERIES, () -> getUnsafe(activityStackGraph).toHighChartsSeries());
|
||||||
|
@ -22,9 +22,8 @@ public class PlayerContainer extends DataContainer {
|
|||||||
activityIndexCache = new HashMap<>();
|
activityIndexCache = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActivityIndex getActivityIndex(long date) {
|
public ActivityIndex getActivityIndex(long date, int minuteThreshold, int loginThreshold) {
|
||||||
// TODO Thresholds from settings
|
return activityIndexCache.computeIfAbsent(date, time -> new ActivityIndex(this, time, minuteThreshold, loginThreshold));
|
||||||
return activityIndexCache.computeIfAbsent(date, time -> new ActivityIndex(this, time, 1, 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean playedBetween(long after, long before) {
|
public boolean playedBetween(long after, long before) {
|
||||||
|
@ -19,9 +19,9 @@ public class ActivityIndex {
|
|||||||
|
|
||||||
public ActivityIndex(
|
public ActivityIndex(
|
||||||
DataContainer container, long date,
|
DataContainer container, long date,
|
||||||
int playThreshold, int loginThreshold
|
int minuteThreshold, int loginThreshold
|
||||||
) {
|
) {
|
||||||
this.playThreshold = playThreshold;
|
this.playThreshold = minuteThreshold;
|
||||||
this.loginThreshold = loginThreshold;
|
this.loginThreshold = loginThreshold;
|
||||||
|
|
||||||
value = calculate(container, date);
|
value = calculate(container, date);
|
||||||
|
@ -70,8 +70,8 @@ public class PlayersMutator {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayersMutator filterActive(long date, double limit) {
|
public PlayersMutator filterActive(long date, int minuteThreshold, int loginThreshold, double limit) {
|
||||||
return filterBy(player -> player.getActivityIndex(date).getValue() >= limit);
|
return filterBy(player -> player.getActivityIndex(date, minuteThreshold, loginThreshold).getValue() >= limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayersMutator filterPlayedOnServer(UUID serverUUID) {
|
public PlayersMutator filterPlayedOnServer(UUID serverUUID) {
|
||||||
@ -123,7 +123,7 @@ public class PlayersMutator {
|
|||||||
return pingPerCountry;
|
return pingPerCountry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TreeMap<Long, Map<String, Set<UUID>>> toActivityDataMap(long date) {
|
public TreeMap<Long, Map<String, Set<UUID>>> toActivityDataMap(long date, int minuteThreshold, int loginThreshold) {
|
||||||
TreeMap<Long, Map<String, Set<UUID>>> activityData = new TreeMap<>();
|
TreeMap<Long, Map<String, Set<UUID>>> activityData = new TreeMap<>();
|
||||||
for (long time = date; time >= date - TimeAmount.MONTH.toMillis(2L); time -= TimeAmount.WEEK.toMillis(1L)) {
|
for (long time = date; time >= date - TimeAmount.MONTH.toMillis(2L); time -= TimeAmount.WEEK.toMillis(1L)) {
|
||||||
Map<String, Set<UUID>> map = activityData.getOrDefault(time, new HashMap<>());
|
Map<String, Set<UUID>> map = activityData.getOrDefault(time, new HashMap<>());
|
||||||
@ -132,7 +132,7 @@ public class PlayersMutator {
|
|||||||
if (player.getValue(PlayerKeys.REGISTERED).orElse(0L) > time) {
|
if (player.getValue(PlayerKeys.REGISTERED).orElse(0L) > time) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ActivityIndex activityIndex = player.getActivityIndex(time);
|
ActivityIndex activityIndex = player.getActivityIndex(time, minuteThreshold, loginThreshold);
|
||||||
String activityGroup = activityIndex.getGroup();
|
String activityGroup = activityIndex.getGroup();
|
||||||
|
|
||||||
Set<UUID> uuids = map.getOrDefault(activityGroup, new HashSet<>());
|
Set<UUID> uuids = map.getOrDefault(activityGroup, new HashSet<>());
|
||||||
|
@ -20,6 +20,8 @@ public abstract class AbstractHealthInfo {
|
|||||||
protected double serverHealth;
|
protected double serverHealth;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
protected int activeMinuteThreshold;
|
||||||
|
protected int activeLoginThreshold;
|
||||||
protected Formatter<Long> timeAmountFormatter;
|
protected Formatter<Long> timeAmountFormatter;
|
||||||
protected Formatter<Double> decimalFormatter;
|
protected Formatter<Double> decimalFormatter;
|
||||||
protected Formatter<Double> percentageFormatter;
|
protected Formatter<Double> percentageFormatter;
|
||||||
@ -102,7 +104,7 @@ public abstract class AbstractHealthInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void activePlayerPlaytimeChange(PlayersMutator playersMutator) {
|
protected void activePlayerPlaytimeChange(PlayersMutator playersMutator) {
|
||||||
PlayersMutator currentlyActive = playersMutator.filterActive(now, 1.75);
|
PlayersMutator currentlyActive = playersMutator.filterActive(now, activeMinuteThreshold, activeLoginThreshold, 1.75);
|
||||||
long twoWeeksAgo = (now - (now - monthAgo)) / 2L;
|
long twoWeeksAgo = (now - (now - monthAgo)) / 2L;
|
||||||
|
|
||||||
long totalFourToTwoWeeks = 0;
|
long totalFourToTwoWeeks = 0;
|
||||||
|
@ -7,6 +7,7 @@ package com.djrapitops.plan.system.settings.config;
|
|||||||
import com.djrapitops.plan.api.exceptions.EnableException;
|
import com.djrapitops.plan.api.exceptions.EnableException;
|
||||||
import com.djrapitops.plan.system.file.PlanFiles;
|
import com.djrapitops.plan.system.file.PlanFiles;
|
||||||
import com.djrapitops.plan.system.settings.theme.Theme;
|
import com.djrapitops.plan.system.settings.theme.Theme;
|
||||||
|
import com.djrapitops.plugin.logging.console.PluginLogger;
|
||||||
import com.djrapitops.plugin.logging.error.ErrorHandler;
|
import com.djrapitops.plugin.logging.error.ErrorHandler;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@ -28,9 +29,10 @@ public class BukkitConfigSystem extends ConfigSystem {
|
|||||||
PlanFiles files,
|
PlanFiles files,
|
||||||
PlanConfig config,
|
PlanConfig config,
|
||||||
Theme theme,
|
Theme theme,
|
||||||
|
PluginLogger logger,
|
||||||
ErrorHandler errorHandler
|
ErrorHandler errorHandler
|
||||||
) {
|
) {
|
||||||
super(files, config, theme, errorHandler);
|
super(files, config, theme, logger, errorHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -7,6 +7,7 @@ package com.djrapitops.plan.system.settings.config;
|
|||||||
import com.djrapitops.plan.api.exceptions.EnableException;
|
import com.djrapitops.plan.api.exceptions.EnableException;
|
||||||
import com.djrapitops.plan.system.file.PlanFiles;
|
import com.djrapitops.plan.system.file.PlanFiles;
|
||||||
import com.djrapitops.plan.system.settings.theme.Theme;
|
import com.djrapitops.plan.system.settings.theme.Theme;
|
||||||
|
import com.djrapitops.plugin.logging.console.PluginLogger;
|
||||||
import com.djrapitops.plugin.logging.error.ErrorHandler;
|
import com.djrapitops.plugin.logging.error.ErrorHandler;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@ -28,9 +29,10 @@ public class BungeeConfigSystem extends ConfigSystem {
|
|||||||
PlanFiles files,
|
PlanFiles files,
|
||||||
PlanConfig config,
|
PlanConfig config,
|
||||||
Theme theme,
|
Theme theme,
|
||||||
|
PluginLogger logger,
|
||||||
ErrorHandler errorHandler
|
ErrorHandler errorHandler
|
||||||
) {
|
) {
|
||||||
super(files, config, theme, errorHandler);
|
super(files, config, theme, logger, errorHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,7 +31,7 @@ public abstract class ConfigSystem implements SubSystem {
|
|||||||
protected final PlanFiles files;
|
protected final PlanFiles files;
|
||||||
protected final PlanConfig config;
|
protected final PlanConfig config;
|
||||||
protected final Theme theme;
|
protected final Theme theme;
|
||||||
private final PluginLogger logger;
|
protected final PluginLogger logger;
|
||||||
protected final ErrorHandler errorHandler;
|
protected final ErrorHandler errorHandler;
|
||||||
|
|
||||||
public ConfigSystem(
|
public ConfigSystem(
|
||||||
|
@ -19,8 +19,6 @@ import java.io.IOException;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class SpongeConfigSystem extends BukkitConfigSystem {
|
public class SpongeConfigSystem extends BukkitConfigSystem {
|
||||||
|
|
||||||
private final PluginLogger logger;
|
|
||||||
|
|
||||||
private boolean firstInstall;
|
private boolean firstInstall;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@ -31,8 +29,7 @@ public class SpongeConfigSystem extends BukkitConfigSystem {
|
|||||||
PluginLogger logger,
|
PluginLogger logger,
|
||||||
ErrorHandler errorHandler
|
ErrorHandler errorHandler
|
||||||
) {
|
) {
|
||||||
super(files, config, theme, errorHandler);
|
super(files, config, theme, logger, errorHandler);
|
||||||
this.logger = logger;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -214,7 +214,9 @@ public class InspectPage implements Page {
|
|||||||
|
|
||||||
pvpAndPve(replacer, sessionsMutator, weekSessionsMutator, monthSessionsMutator);
|
pvpAndPve(replacer, sessionsMutator, weekSessionsMutator, monthSessionsMutator);
|
||||||
|
|
||||||
ActivityIndex activityIndex = player.getActivityIndex(now);
|
ActivityIndex activityIndex = player.getActivityIndex(
|
||||||
|
now, config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD), config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD)
|
||||||
|
);
|
||||||
|
|
||||||
replacer.put("activityIndexNumber", activityIndex.getFormattedValue(decimalFormatter));
|
replacer.put("activityIndexNumber", activityIndex.getFormattedValue(decimalFormatter));
|
||||||
replacer.put("activityIndexColor", activityIndex.getColor());
|
replacer.put("activityIndexColor", activityIndex.getColor());
|
||||||
|
@ -136,7 +136,10 @@ public class HtmlTables {
|
|||||||
*/
|
*/
|
||||||
public TableContainer playerTableForServerPage(List<PlayerContainer> players) {
|
public TableContainer playerTableForServerPage(List<PlayerContainer> players) {
|
||||||
return new PlayersTable(
|
return new PlayersTable(
|
||||||
players, config.getNumber(Settings.MAX_PLAYERS),
|
players,
|
||||||
|
config.getNumber(Settings.MAX_PLAYERS),
|
||||||
|
config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD),
|
||||||
|
config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD),
|
||||||
formatters.timeAmount(), formatters.yearLong(), formatters.decimals()
|
formatters.timeAmount(), formatters.yearLong(), formatters.decimals()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -150,7 +153,7 @@ public class HtmlTables {
|
|||||||
public TableContainer playerTableForPlayersPage(List<PlayerContainer> players) {
|
public TableContainer playerTableForPlayersPage(List<PlayerContainer> players) {
|
||||||
return new PlayersTable(
|
return new PlayersTable(
|
||||||
players, config.getNumber(Settings.MAX_PLAYERS_PLAYERS_PAGE),
|
players, config.getNumber(Settings.MAX_PLAYERS_PLAYERS_PAGE),
|
||||||
formatters.timeAmount(), formatters.yearLong(), formatters.decimals()
|
config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD), config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD), formatters.timeAmount(), formatters.yearLong(), formatters.decimals()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,11 +25,16 @@ class PlayersTable extends TableContainer {
|
|||||||
|
|
||||||
private final List<PlayerContainer> players;
|
private final List<PlayerContainer> players;
|
||||||
private final int maxPlayers;
|
private final int maxPlayers;
|
||||||
|
private final int activeMinuteThreshold;
|
||||||
|
private final int activeLoginThreshold;
|
||||||
|
|
||||||
private final Formatter<Double> decimalFormatter;
|
private final Formatter<Double> decimalFormatter;
|
||||||
|
|
||||||
PlayersTable(
|
PlayersTable(
|
||||||
List<PlayerContainer> players,
|
List<PlayerContainer> players,
|
||||||
int maxPlayers,
|
int maxPlayers,
|
||||||
|
int activeMinuteThreshold,
|
||||||
|
int activeLoginThreshold,
|
||||||
Formatter<Long> timeAmountFormatter,
|
Formatter<Long> timeAmountFormatter,
|
||||||
Formatter<Long> yearLongFormatter,
|
Formatter<Long> yearLongFormatter,
|
||||||
Formatter<Double> decimalFormatter
|
Formatter<Double> decimalFormatter
|
||||||
@ -45,6 +50,8 @@ class PlayersTable extends TableContainer {
|
|||||||
);
|
);
|
||||||
this.players = players;
|
this.players = players;
|
||||||
this.maxPlayers = maxPlayers;
|
this.maxPlayers = maxPlayers;
|
||||||
|
this.activeMinuteThreshold = activeMinuteThreshold;
|
||||||
|
this.activeLoginThreshold = activeLoginThreshold;
|
||||||
this.decimalFormatter = decimalFormatter;
|
this.decimalFormatter = decimalFormatter;
|
||||||
useJqueryDataTables("player-table");
|
useJqueryDataTables("player-table");
|
||||||
|
|
||||||
@ -74,7 +81,7 @@ class PlayersTable extends TableContainer {
|
|||||||
long registered = player.getValue(PlayerKeys.REGISTERED).orElse(0L);
|
long registered = player.getValue(PlayerKeys.REGISTERED).orElse(0L);
|
||||||
long lastSeen = sessionsMutator.toLastSeen();
|
long lastSeen = sessionsMutator.toLastSeen();
|
||||||
|
|
||||||
ActivityIndex activityIndex = player.getActivityIndex(now);
|
ActivityIndex activityIndex = player.getActivityIndex(now, activeMinuteThreshold, activeLoginThreshold);
|
||||||
boolean isBanned = player.getValue(PlayerKeys.BANNED).orElse(false);
|
boolean isBanned = player.getValue(PlayerKeys.BANNED).orElse(false);
|
||||||
String activityString = activityIndex.getFormattedValue(decimalFormatter)
|
String activityString = activityIndex.getFormattedValue(decimalFormatter)
|
||||||
+ (isBanned ? " (<b>Banned</b>)" : " (" + activityIndex.getGroup() + ")");
|
+ (isBanned ? " (<b>Banned</b>)" : " (" + activityIndex.getGroup() + ")");
|
||||||
|
@ -36,7 +36,7 @@ public class PlayersTableTest {
|
|||||||
PlayerContainer container = new PlayerContainer();
|
PlayerContainer container = new PlayerContainer();
|
||||||
container.putRawData(PlayerKeys.SESSIONS, new ArrayList<>());
|
container.putRawData(PlayerKeys.SESSIONS, new ArrayList<>());
|
||||||
List<PlayerContainer> players = Collections.singletonList(container);
|
List<PlayerContainer> players = Collections.singletonList(container);
|
||||||
String html = new PlayersTable(players, 50, l -> "", l -> "", d -> "").parseHtml();
|
String html = new PlayersTable(players, 50, 60, 5, l -> "", l -> "", d -> "").parseHtml();
|
||||||
|
|
||||||
testHtmlValidity(html);
|
testHtmlValidity(html);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user