mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-08 01:17:45 +01:00
Removed leftovers of Health information
This commit is contained in:
parent
4706953387
commit
93314239c9
@ -22,7 +22,6 @@ import com.djrapitops.plan.data.store.keys.NetworkKeys;
|
||||
import com.djrapitops.plan.data.store.keys.ServerKeys;
|
||||
import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
||||
import com.djrapitops.plan.data.store.mutators.TPSMutator;
|
||||
import com.djrapitops.plan.data.store.mutators.health.NetworkHealthInformation;
|
||||
import com.djrapitops.plan.db.Database;
|
||||
import com.djrapitops.plan.db.access.queries.ServerAggregateQueries;
|
||||
import com.djrapitops.plan.db.access.queries.objects.GeoInfoQueries;
|
||||
@ -97,7 +96,6 @@ public class NetworkContainer extends DynamicDataContainer {
|
||||
addConstants();
|
||||
addServerBoxes();
|
||||
addPlayerInformation();
|
||||
addNetworkHealth();
|
||||
}
|
||||
|
||||
private void addServerBoxes() {
|
||||
@ -133,20 +131,6 @@ public class NetworkContainer extends DynamicDataContainer {
|
||||
});
|
||||
}
|
||||
|
||||
private void addNetworkHealth() {
|
||||
Key<NetworkHealthInformation> healthInformation = new Key<>(NetworkHealthInformation.class, "HEALTH_INFORMATION");
|
||||
putCachingSupplier(healthInformation, () -> new NetworkHealthInformation(
|
||||
this,
|
||||
locale,
|
||||
config.get(TimeSettings.ACTIVE_PLAY_THRESHOLD),
|
||||
config.get(TimeSettings.ACTIVE_LOGIN_THRESHOLD),
|
||||
formatters.timeAmount(), formatters.decimals(), formatters.percentage(),
|
||||
config.getTimeZone()
|
||||
));
|
||||
putCachingSupplier(NetworkKeys.HEALTH_INDEX, () -> getUnsafe(healthInformation).getServerHealth());
|
||||
putCachingSupplier(NetworkKeys.HEALTH_NOTES, () -> getUnsafe(healthInformation).toHtml());
|
||||
}
|
||||
|
||||
private void addConstants() {
|
||||
long now = System.currentTimeMillis();
|
||||
putRawData(NetworkKeys.REFRESH_TIME, now);
|
||||
|
@ -31,6 +31,7 @@ import java.util.*;
|
||||
* @author Rsl1122
|
||||
* @see com.djrapitops.plan.data.store.containers.NetworkContainer for DataContainer.
|
||||
*/
|
||||
@Deprecated
|
||||
public class NetworkKeys {
|
||||
|
||||
public static final PlaceholderKey<String> VERSION = CommonPlaceholderKeys.VERSION;
|
||||
|
@ -1,191 +0,0 @@
|
||||
/*
|
||||
* This file is part of Player Analytics (Plan).
|
||||
*
|
||||
* Plan is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License v3 as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Plan is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.djrapitops.plan.data.store.mutators.health;
|
||||
|
||||
import com.djrapitops.plan.data.store.containers.PlayerContainer;
|
||||
import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
||||
import com.djrapitops.plan.data.store.mutators.SessionsMutator;
|
||||
import com.djrapitops.plan.system.locale.Locale;
|
||||
import com.djrapitops.plan.system.locale.lang.HealthInfoLang;
|
||||
import com.djrapitops.plan.utilities.formatting.Formatter;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icons;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public abstract class AbstractHealthInfo {
|
||||
|
||||
protected static final String SUB_NOTE = "<br> ";
|
||||
|
||||
protected final List<String> notes;
|
||||
protected final long now;
|
||||
protected final long monthAgo;
|
||||
|
||||
protected double serverHealth;
|
||||
|
||||
protected final Locale locale;
|
||||
protected final long activeMsThreshold;
|
||||
protected final int activeLoginThreshold;
|
||||
protected final Formatter<Long> timeAmountFormatter;
|
||||
protected final Formatter<Double> decimalFormatter;
|
||||
protected final Formatter<Double> percentageFormatter;
|
||||
|
||||
public AbstractHealthInfo(
|
||||
long now, long monthAgo,
|
||||
Locale locale,
|
||||
long activeMsThreshold,
|
||||
int activeLoginThreshold,
|
||||
Formatter<Long> timeAmountFormatter,
|
||||
Formatter<Double> decimalFormatter,
|
||||
Formatter<Double> percentageFormatter
|
||||
) {
|
||||
this.now = now;
|
||||
this.monthAgo = monthAgo;
|
||||
this.locale = locale;
|
||||
this.activeMsThreshold = activeMsThreshold;
|
||||
this.activeLoginThreshold = activeLoginThreshold;
|
||||
this.timeAmountFormatter = timeAmountFormatter;
|
||||
this.decimalFormatter = decimalFormatter;
|
||||
this.percentageFormatter = percentageFormatter;
|
||||
serverHealth = 100.0;
|
||||
|
||||
this.notes = new ArrayList<>();
|
||||
}
|
||||
|
||||
protected abstract void calculate();
|
||||
|
||||
public double getServerHealth() {
|
||||
return serverHealth;
|
||||
}
|
||||
|
||||
public String toHtml() {
|
||||
StringBuilder healthNoteBuilder = new StringBuilder();
|
||||
for (String healthNote : notes) {
|
||||
healthNoteBuilder.append(healthNote);
|
||||
}
|
||||
return healthNoteBuilder.toString();
|
||||
}
|
||||
|
||||
protected void activityChangeNote(TreeMap<Long, Map<String, Set<UUID>>> activityData) {
|
||||
Map<String, Set<UUID>> activityNow = activityData.getOrDefault(now, new HashMap<>());
|
||||
Set<UUID> veryActiveNow = activityNow.getOrDefault("Very Active", new HashSet<>());
|
||||
Set<UUID> activeNow = activityNow.getOrDefault("Active", new HashSet<>());
|
||||
Set<UUID> regularNow = activityNow.getOrDefault("Regular", new HashSet<>());
|
||||
|
||||
Map<String, Set<UUID>> activityFourWAgo = activityData.getOrDefault(monthAgo, new HashMap<>());
|
||||
Set<UUID> veryActiveFWAG = activityFourWAgo.getOrDefault("Very Active", new HashSet<>());
|
||||
Set<UUID> activeFWAG = activityFourWAgo.getOrDefault("Active", new HashSet<>());
|
||||
Set<UUID> regularFWAG = activityFourWAgo.getOrDefault("Regular", new HashSet<>());
|
||||
|
||||
Set<UUID> regularRemainCompareSet = new HashSet<>(regularFWAG);
|
||||
regularRemainCompareSet.addAll(activeFWAG);
|
||||
regularRemainCompareSet.addAll(veryActiveFWAG);
|
||||
|
||||
int activeFWAGNum = regularRemainCompareSet.size();
|
||||
regularRemainCompareSet.removeAll(regularNow);
|
||||
regularRemainCompareSet.removeAll(activeNow);
|
||||
regularRemainCompareSet.removeAll(veryActiveNow);
|
||||
int notRegularAnymore = regularRemainCompareSet.size();
|
||||
int remain = activeFWAGNum - notRegularAnymore;
|
||||
double percRemain = activeFWAGNum != 0 ? remain * 1.0 / activeFWAGNum : 1.0;
|
||||
|
||||
int newActive = getNewActive(veryActiveNow, activeNow, regularNow, veryActiveFWAG, activeFWAG, regularFWAG);
|
||||
|
||||
int change = newActive - notRegularAnymore;
|
||||
|
||||
StringBuilder remainNote = new StringBuilder();
|
||||
if (activeFWAGNum != 0) {
|
||||
remainNote.append(SUB_NOTE);
|
||||
if (percRemain > 0.5) {
|
||||
remainNote.append(Icons.GREEN_THUMB);
|
||||
} else if (percRemain > 0.2) {
|
||||
remainNote.append(Icons.YELLOW_FLAG);
|
||||
} else {
|
||||
remainNote.append(Icons.RED_WARN);
|
||||
serverHealth -= 2.5;
|
||||
}
|
||||
|
||||
remainNote.append(locale.getString(HealthInfoLang.REGULAR_ACTIVITY_REMAIN,
|
||||
percentageFormatter.apply(percRemain),
|
||||
remain, activeFWAGNum
|
||||
));
|
||||
}
|
||||
|
||||
String sentenceStart = locale.getString(HealthInfoLang.REGULAR_CHANGE);
|
||||
if (change > 0) {
|
||||
addNote(Icons.GREEN_THUMB + sentenceStart + locale.getString(HealthInfoLang.REGULAR_CHANGE_INCREASE, change) + remainNote);
|
||||
} else if (change == 0) {
|
||||
addNote(Icons.GREEN_THUMB + sentenceStart + locale.getString(HealthInfoLang.REGULAR_CHANGE_ZERO, change) + remainNote);
|
||||
} else if (change > -20) {
|
||||
addNote(Icons.YELLOW_FLAG + sentenceStart + locale.getString(HealthInfoLang.REGULAR_CHANGE_DECREASE, change) + remainNote);
|
||||
serverHealth -= 5;
|
||||
} else {
|
||||
addNote(Icons.RED_WARN + sentenceStart + locale.getString(HealthInfoLang.REGULAR_CHANGE_DECREASE, change) + remainNote);
|
||||
serverHealth -= 10;
|
||||
}
|
||||
}
|
||||
|
||||
protected void activePlayerPlaytimeChange(PlayersMutator playersMutator) {
|
||||
PlayersMutator currentlyActive = playersMutator.filterActive(now, activeMsThreshold, 1.75);
|
||||
long twoWeeksAgo = now - ((now - monthAgo) / 2L);
|
||||
|
||||
long totalFourToTwoWeeks = 0;
|
||||
long totalLastTwoWeeks = 0;
|
||||
for (PlayerContainer activePlayer : currentlyActive.all()) {
|
||||
totalFourToTwoWeeks += SessionsMutator.forContainer(activePlayer)
|
||||
.filterSessionsBetween(monthAgo, twoWeeksAgo).toActivePlaytime();
|
||||
totalLastTwoWeeks += SessionsMutator.forContainer(activePlayer)
|
||||
.filterSessionsBetween(twoWeeksAgo, now).toActivePlaytime();
|
||||
}
|
||||
int activeCount = currentlyActive.count();
|
||||
if (activeCount != 0) {
|
||||
long avgFourToTwoWeeks = totalFourToTwoWeeks / (long) activeCount;
|
||||
long avgLastTwoWeeks = totalLastTwoWeeks / (long) activeCount;
|
||||
String avgLastTwoWeeksString = timeAmountFormatter.apply(avgLastTwoWeeks);
|
||||
String avgFourToTwoWeeksString = timeAmountFormatter.apply(avgFourToTwoWeeks);
|
||||
|
||||
// Played more or equal amount than 2 weeks ago
|
||||
if (avgLastTwoWeeks >= avgFourToTwoWeeks) {
|
||||
addNote(Icons.GREEN_THUMB + locale.getString(HealthInfoLang.ACTIVE_PLAY_COMPARISON_INCREASE,
|
||||
avgLastTwoWeeksString, avgFourToTwoWeeksString));
|
||||
// Played more than 2 hours less, than 2 weeks ago
|
||||
} else if (avgFourToTwoWeeks - avgLastTwoWeeks > TimeUnit.HOURS.toMillis(2L)) {
|
||||
addNote(Icons.RED_WARN + locale.getString(HealthInfoLang.ACTIVE_PLAY_COMPARISON_DECREASE,
|
||||
avgLastTwoWeeksString, avgFourToTwoWeeksString));
|
||||
serverHealth -= 5;
|
||||
// Played less than two weeks ago
|
||||
} else {
|
||||
addNote(Icons.YELLOW_FLAG + locale.getString(HealthInfoLang.ACTIVE_PLAY_COMPARISON_DECREASE,
|
||||
avgLastTwoWeeksString, avgFourToTwoWeeksString));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getNewActive(Set<UUID> veryActiveNow, Set<UUID> activeNow, Set<UUID> regularNow, Set<UUID> veryActiveFWAG, Set<UUID> activeFWAG, Set<UUID> regularFWAG) {
|
||||
Set<UUID> regularNewCompareSet = new HashSet<>(regularNow);
|
||||
regularNewCompareSet.addAll(activeNow);
|
||||
regularNewCompareSet.addAll(veryActiveNow);
|
||||
regularNewCompareSet.removeAll(regularFWAG);
|
||||
regularNewCompareSet.removeAll(activeFWAG);
|
||||
regularNewCompareSet.removeAll(veryActiveFWAG);
|
||||
return regularNewCompareSet.size();
|
||||
}
|
||||
|
||||
protected void addNote(String note) {
|
||||
notes.add("<p>" + note + "</p>");
|
||||
}
|
||||
}
|
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* This file is part of Player Analytics (Plan).
|
||||
*
|
||||
* Plan is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License v3 as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Plan is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.djrapitops.plan.data.store.mutators.health;
|
||||
|
||||
import com.djrapitops.plan.data.store.Key;
|
||||
import com.djrapitops.plan.data.store.containers.DataContainer;
|
||||
import com.djrapitops.plan.data.store.containers.NetworkContainer;
|
||||
import com.djrapitops.plan.data.store.containers.SupplierDataContainer;
|
||||
import com.djrapitops.plan.data.store.keys.AnalysisKeys;
|
||||
import com.djrapitops.plan.data.store.keys.NetworkKeys;
|
||||
import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
||||
import com.djrapitops.plan.data.store.mutators.SessionsMutator;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import com.djrapitops.plan.system.locale.Locale;
|
||||
import com.djrapitops.plan.system.locale.lang.HealthInfoLang;
|
||||
import com.djrapitops.plan.utilities.formatting.Formatter;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icons;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class NetworkHealthInformation extends AbstractHealthInfo {
|
||||
|
||||
private final NetworkContainer container;
|
||||
private final TimeZone timeZone;
|
||||
|
||||
public NetworkHealthInformation(
|
||||
NetworkContainer container,
|
||||
Locale locale,
|
||||
long activeMsThreshold,
|
||||
int activeLoginThreshold,
|
||||
Formatter<Long> timeAmountFormatter,
|
||||
Formatter<Double> decimalFormatter,
|
||||
Formatter<Double> percentageFormatter,
|
||||
TimeZone timeZone
|
||||
) {
|
||||
super(
|
||||
container.getUnsafe(NetworkKeys.REFRESH_TIME),
|
||||
container.getUnsafe(NetworkKeys.REFRESH_TIME_MONTH_AGO),
|
||||
locale,
|
||||
activeMsThreshold, activeLoginThreshold,
|
||||
timeAmountFormatter, decimalFormatter, percentageFormatter
|
||||
);
|
||||
this.container = container;
|
||||
this.timeZone = timeZone;
|
||||
calculate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void calculate() {
|
||||
perServerComparisonNotes(container.getUnsafe(NetworkKeys.PLAYERS_MUTATOR));
|
||||
|
||||
activityChangeNote(container.getUnsafe(NetworkKeys.ACTIVITY_DATA));
|
||||
activePlayerPlaytimeChange(container.getUnsafe(NetworkKeys.PLAYERS_MUTATOR));
|
||||
}
|
||||
|
||||
private void perServerComparisonNotes(PlayersMutator playersMutator) {
|
||||
Collection<Server> servers = container.getValue(NetworkKeys.BUKKIT_SERVERS)
|
||||
.orElse(Collections.emptyList());
|
||||
|
||||
if (servers.isEmpty()) {
|
||||
addNote(Icons.HELP_RING + locale.getString(HealthInfoLang.NO_SERVERS_INACCURACY));
|
||||
return;
|
||||
}
|
||||
int serverCount = servers.size();
|
||||
if (serverCount == 1) {
|
||||
addNote(Icons.HELP_RING + locale.getString(HealthInfoLang.SINGLE_SERVER_INACCURACY));
|
||||
return;
|
||||
}
|
||||
|
||||
Key<Server> serverKey = new Key<>(Server.class, "SERVER");
|
||||
|
||||
List<DataContainer> perServerContainers = getPerServerContainers(playersMutator, servers, serverKey);
|
||||
|
||||
uniquePlayersNote(serverCount, serverKey, perServerContainers);
|
||||
newPlayersNote(serverCount, serverKey, perServerContainers);
|
||||
playersNote(serverKey, perServerContainers);
|
||||
}
|
||||
|
||||
private void uniquePlayersNote(int serverCount, Key<Server> serverKey, List<DataContainer> perServerContainers) {
|
||||
Icon icon;
|
||||
String uniquePlayersNote = locale.getString(HealthInfoLang.PLAYER_VISIT_PER_SERVER);
|
||||
double average = perServerContainers.stream()
|
||||
.mapToInt(c -> c.getUnsafe(AnalysisKeys.AVG_PLAYERS_MONTH))
|
||||
.average().orElse(0.0);
|
||||
if (average < 1) {
|
||||
icon = Icons.RED_WARN;
|
||||
serverHealth -= 10.0;
|
||||
} else if (average < serverCount) {
|
||||
icon = Icons.YELLOW_FLAG;
|
||||
serverHealth -= 5.0;
|
||||
} else {
|
||||
icon = Icons.GREEN_THUMB;
|
||||
}
|
||||
StringBuilder subNotes = new StringBuilder();
|
||||
perServerContainers.stream()
|
||||
.sorted(Comparator.comparingInt(c -> 0 - c.getUnsafe(AnalysisKeys.AVG_PLAYERS_MONTH)))
|
||||
.map(c -> {
|
||||
int playersPerMonth = c.getUnsafe(AnalysisKeys.AVG_PLAYERS_MONTH);
|
||||
Server server = c.getUnsafe(serverKey);
|
||||
return SUB_NOTE + (playersPerMonth >= average && playersPerMonth > 0 ? Icons.GREEN_PLUS : Icons.RED_MINUS) + " " +
|
||||
server.getName() + ": " + playersPerMonth;
|
||||
}).forEach(subNotes::append);
|
||||
addNote(icon + " " + decimalFormatter.apply(average) + uniquePlayersNote + subNotes.toString());
|
||||
}
|
||||
|
||||
private void newPlayersNote(int serverCount, Key<Server> serverKey, List<DataContainer> perServerContainers) {
|
||||
Icon icon;
|
||||
String newPlayersNote = locale.getString(HealthInfoLang.PLAYER_REGISTER_PER_SERVER);
|
||||
double average = perServerContainers.stream()
|
||||
.mapToInt(c -> c.getUnsafe(AnalysisKeys.AVG_PLAYERS_NEW_MONTH))
|
||||
.average().orElse(0.0);
|
||||
if (average < 1) {
|
||||
icon = Icons.RED_WARN;
|
||||
serverHealth -= 10.0;
|
||||
} else if (average < serverCount) {
|
||||
icon = Icons.YELLOW_FLAG;
|
||||
serverHealth -= 5.0;
|
||||
} else {
|
||||
icon = Icons.GREEN_THUMB;
|
||||
}
|
||||
StringBuilder subNotes = new StringBuilder();
|
||||
perServerContainers.stream()
|
||||
.sorted(Comparator.comparingInt(c -> 0 - c.getUnsafe(AnalysisKeys.AVG_PLAYERS_NEW_MONTH)))
|
||||
.map(c -> {
|
||||
int playersPerMonth = c.getUnsafe(AnalysisKeys.AVG_PLAYERS_NEW_MONTH);
|
||||
Server server = c.getUnsafe(serverKey);
|
||||
return SUB_NOTE + (playersPerMonth >= average && playersPerMonth > 0 ? Icons.GREEN_PLUS : Icons.RED_MINUS) + " " +
|
||||
server.getName() + ": " + playersPerMonth;
|
||||
}).forEach(subNotes::append);
|
||||
addNote(icon + " " + decimalFormatter.apply(average) + newPlayersNote + subNotes.toString());
|
||||
}
|
||||
|
||||
private List<DataContainer> getPerServerContainers(PlayersMutator playersMutator, Collection<Server> servers, Key<Server> serverKey) {
|
||||
List<DataContainer> perServerContainers = new ArrayList<>();
|
||||
|
||||
for (Server server : servers) {
|
||||
UUID serverUUID = server.getUuid();
|
||||
DataContainer serverContainer = new SupplierDataContainer();
|
||||
serverContainer.putRawData(serverKey, server);
|
||||
|
||||
PlayersMutator serverPlayers = playersMutator.filterPlayedOnServer(serverUUID);
|
||||
PlayersMutator serverRegistered = serverPlayers.filterRegisteredBetween(monthAgo, now);
|
||||
int averageNewPerDay = serverRegistered.averageNewPerDay(timeZone);
|
||||
serverContainer.putRawData(AnalysisKeys.AVG_PLAYERS_NEW_MONTH, averageNewPerDay);
|
||||
SessionsMutator serverSessions = new SessionsMutator(serverPlayers.getSessions())
|
||||
.filterSessionsBetween(monthAgo, now)
|
||||
.filterPlayedOnServer(serverUUID);
|
||||
int averageUniquePerDay = serverSessions.toAverageUniqueJoinsPerDay(timeZone);
|
||||
int uniquePlayers = serverSessions.toUniquePlayers();
|
||||
serverContainer.putRawData(AnalysisKeys.AVG_PLAYERS_MONTH, averageUniquePerDay);
|
||||
serverContainer.putRawData(AnalysisKeys.PLAYERS_MONTH, uniquePlayers);
|
||||
|
||||
perServerContainers.add(serverContainer);
|
||||
}
|
||||
return perServerContainers;
|
||||
}
|
||||
|
||||
private void playersNote(Key<Server> serverKey, List<DataContainer> perServerContainers) {
|
||||
Icon icon = Icons.HELP_RING;
|
||||
String uniquePlayersNote = "${playersMonth}" + locale.getString(HealthInfoLang.PLAYER_PLAY_ON_NETWORK);
|
||||
StringBuilder subNotes = new StringBuilder();
|
||||
perServerContainers.stream()
|
||||
.sorted(Comparator.comparingInt(c -> 0 - c.getUnsafe(AnalysisKeys.PLAYERS_MONTH)))
|
||||
.map(c -> {
|
||||
int playersPerMonth = c.getUnsafe(AnalysisKeys.PLAYERS_MONTH);
|
||||
Server server = c.getUnsafe(serverKey);
|
||||
return SUB_NOTE + (playersPerMonth > 0 ? Icons.GREEN_PLUS : Icons.RED_MINUS) + " " +
|
||||
server.getName() + ": " + playersPerMonth;
|
||||
}).forEach(subNotes::append);
|
||||
addNote(icon.toHtml() + " " + uniquePlayersNote + subNotes.toString());
|
||||
}
|
||||
}
|
@ -78,8 +78,7 @@ public class LocaleSystem implements SubSystem {
|
||||
ServerPageLang.values(),
|
||||
NetworkPageLang.values(),
|
||||
ErrorPageLang.values(),
|
||||
FailReason.values(),
|
||||
HealthInfoLang.values()
|
||||
FailReason.values()
|
||||
};
|
||||
|
||||
return Arrays.stream(lang)
|
||||
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* This file is part of Player Analytics (Plan).
|
||||
*
|
||||
* Plan is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License v3 as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Plan is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.djrapitops.plan.system.locale.lang;
|
||||
|
||||
/**
|
||||
* {@link Lang} enum for {@link com.djrapitops.plan.data.store.mutators.health.AbstractHealthInfo} related language.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
public enum HealthInfoLang implements Lang {
|
||||
REGULAR_ACTIVITY_REMAIN("Regular Activity Remain", " ${0} of regular players have remained active (${1}/${2})"),
|
||||
REGULAR_CHANGE("Regular Activity Change", " Number of regular players has "),
|
||||
REGULAR_CHANGE_INCREASE("Regular Activity Change Increase", "increased (+${0})"),
|
||||
REGULAR_CHANGE_ZERO("Regular Activity Change Zero", "stayed the same (+${0})"),
|
||||
REGULAR_CHANGE_DECREASE("Regular Activity Change Decrease", "decreased (${0})"),
|
||||
ACTIVE_PLAY_COMPARISON_INCREASE("Active Playtime Comparison Increase", " Active players seem to have things to do (Played ${0} vs ${1}, last two weeks vs weeks 2-4)"),
|
||||
ACTIVE_PLAY_COMPARISON_DECREASE("Active Playtime Comparison Decrease", " Active players might be running out of things to do (Played ${0} vs ${1}, last two weeks vs weeks 2-4)"),
|
||||
NEW_PLAYER_JOIN_PLAYERS_GOOD("New Player Join Players, Yes", " New Players have players to play with when they join (${0} on average)"),
|
||||
NEW_PLAYER_JOIN_PLAYERS_BAD("New Player Join Players, No", " New Players may not have players to play with when they join (${0} on average)"),
|
||||
NEW_PLAYER_STICKINESS("New Player Stickiness", " ${0} of new players have stuck around (${1}/${2})"),
|
||||
TPS_ABOVE_LOW_THERSHOLD("TPS Above Low Threshold", " Average TPS was above Low Threshold ${0} of the time"),
|
||||
TPS_LOW_DIPS("TPS Low Dips", " Average TPS dropped below Low Threshold (${0}) ${1} times"),
|
||||
DOWNTIME("Downtime", " Total Server downtime (No Data) was ${0}"),
|
||||
NO_SERVERS_INACCURACY("No Servers Inaccuracy", " No Bukkit/Sponge servers to gather session data - These measures are inaccurate."),
|
||||
SINGLE_SERVER_INACCURACY("Single Servers Inaccuracy", " Single Bukkit/Sponge server to gather session data."),
|
||||
PLAYER_VISIT_PER_SERVER("Player Visit Server", " players visit on servers per day/server on average."),
|
||||
PLAYER_REGISTER_PER_SERVER("Player Register Server", " players register on servers per day/server on average."),
|
||||
PLAYER_PLAY_ON_NETWORK("Player Play on Network", " players played on the network:");
|
||||
|
||||
private final String identifier;
|
||||
private final String defaultValue;
|
||||
|
||||
HealthInfoLang(String identifier, String defaultValue) {
|
||||
this.identifier = identifier;
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return "Health - " + identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDefault() {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
@ -315,23 +315,5 @@ WebServer FAIL - SSL Context || 网页服务器:SSL 环境
|
||||
WebServer FAIL - Store Load || 网页服务器:SSL 证书载入失败。
|
||||
Yesterday || '昨天'
|
||||
Today || '今天'
|
||||
Health - Active Playtime Comparison Decrease || 玩家可能闲得没事干了 (活跃玩家数 ${0} vs ${1}, 最近2周 vs 2-4周)
|
||||
Health - Active Playtime Comparison Increase || 玩家可能有很多事要做 (活跃玩家数 ${0} vs ${1}, 最近2周 vs 2-4周)
|
||||
Health - Downtime || 服务器停机时间为 (无数据传输的时间) ${0}
|
||||
Health - New Player Join Players, No || 新玩家里也许很少有人继续玩下去 (平均为 ${0} )
|
||||
Health - New Player Join Players, Yes || 新玩家里有人玩了下去 (平均为 ${0} )
|
||||
Health - New Player Stickiness || ${0} 的新玩家留了下来 (${1}/${2})
|
||||
Health - No Servers Inaccuracy || 没有可收集数据的 Bukkit/Sponge 服务器 - 这些数据不准确.
|
||||
Health - Player Play on Network || 在这个服务器网络内游玩的玩家:
|
||||
Health - Player Register Server || 平均每日每服务器注册玩家数.
|
||||
Health - Player Visit Server || 平均每日每服务器登录服务器玩家数.
|
||||
Health - Regular Activity Change || 普通玩家数
|
||||
Health - Regular Activity Change Decrease || 减少了 (${0})
|
||||
Health - Regular Activity Change Increase || 增加了 (+${0})
|
||||
Health - Regular Activity Change Zero || 保持不变 (+${0})
|
||||
Health - Regular Activity Remain || ${0} 普通玩家仍保持活跃 (${1}/${2})
|
||||
Health - Single Servers Inaccuracy || 收集单个 Bukkit/Sponge 服务器的时域数据.
|
||||
Health - TPS Above Low Threshold || ${0} 的平均TPS超过了最低门槛
|
||||
Health - TPS Low Dips || 平均TPS低于最低门槛 (${0}) ${1} 此
|
||||
HTML - FREE_DISK_SPACE || 剩余磁盘空间
|
||||
HTML - DISK_SPACE || 磁盘空间
|
@ -314,23 +314,5 @@ WebServer FAIL - SSL Context || WebServer: SSL Context Initia
|
||||
WebServer FAIL - Store Load || WebServer: SSL Zertifikat konnte nicht geladen werden.
|
||||
Yesterday || 'Gestern'
|
||||
Today || 'Heute'
|
||||
Health - Active Playtime Comparison Decrease || Aktive Spieler haben möglicherweise nichts mehr zu tun (Vergleich der letzten zwei Wochen: ${0} zu den vorletzten zwei Wochen: ${1}.
|
||||
Health - Active Playtime Comparison Increase || Aktive Spieler haben möglicherweise mehr zu tun (Vergleich der letzten zwei Wochen: ${0} ; zu den vorletzten zwei Wochen: ${1}.
|
||||
Health - Downtime || Gesamte Serverdowntime (Keine Daten) war ${0}
|
||||
Health - New Player Join Players, No || Neue Spieler haben möglicherweise keine anderen Spielern, mit denen sie spielen können. (${0} im Durchschnitt)
|
||||
Health - New Player Join Players, Yes || Neue Spieler haben andere Spieler, mit denen Spielen können. (${0} im Durchschnitt)
|
||||
Health - New Player Stickiness || ${0} von den neuen Spieler sind geblieben (${1}/${2})
|
||||
Health - No Servers Inaccuracy || Es sind keine Bukkit/Sponge-Server verfügbar um Sessiondaten zu sammeln - Diese Messungen sind ungenau.
|
||||
Health - Player Play on Network || Spieler spielten im Netzwerk. Auf den Servern sieht's wie folgt aus:
|
||||
Health - Player Register Server || Spieler wurden auf dem Server pro Tag/Server im Durchschnitt registriert.
|
||||
Health - Player Visit Server || Spieler haben den Server am Tag/Server im Durchschnitt besucht.
|
||||
Health - Regular Activity Change || Anzahl an regelmässigen Spielern
|
||||
Health - Regular Activity Change Decrease || verringert um (${0})
|
||||
Health - Regular Activity Change Increase || erhöht um (+${0})
|
||||
Health - Regular Activity Change Zero || Bleibt gleich (+${0})
|
||||
Health - Regular Activity Remain || ${0} von den regelmässigen Spielern sind aktiv geblieben (${1}/${2})
|
||||
Health - Single Servers Inaccuracy || Einzelner Bukkit/Sponge um Sessiondaten zu sammeln.
|
||||
Health - TPS Above Low Threshold || Durchschnittliche TPS war über der unteren Grenze ${0} in der Zeit.
|
||||
Health - TPS Low Dips || Durchschnittliche TPS war unter der unteren Grenze. (${0}) ${1} male.
|
||||
HTML - FREE_DISK_SPACE || Freier Festplattenspeicher
|
||||
HTML - DISK_SPACE || Festplattenspeicher
|
||||
|
@ -314,23 +314,5 @@ WebServer FAIL - SSL Context || WebServer: SSL Context Initia
|
||||
WebServer FAIL - Store Load || WebServer: SSL Certificate loading Failed.
|
||||
Yesterday || 'Yesterday'
|
||||
Today || 'Today'
|
||||
Health - Active Playtime Comparison Decrease || Active players might be running out of things to do (Played ${0} vs ${1}, last two weeks vs weeks 2-4)
|
||||
Health - Active Playtime Comparison Increase || Active players seem to have things to do (Played ${0} vs ${1}, last two weeks vs weeks 2-4)
|
||||
Health - Downtime || Total Server downtime (No Data) was ${0}
|
||||
Health - New Player Join Players, No || New Players may not have players to play with when they join (${0} on average)
|
||||
Health - New Player Join Players, Yes || New Players have players to play with when they join (${0} on average)
|
||||
Health - New Player Stickiness || ${0} of new players have stuck around (${1}/${2})
|
||||
Health - No Servers Inaccuracy || No Bukkit/Sponge servers to gather session data - These measures are inaccurate.
|
||||
Health - Player Play on Network || players played on the network:
|
||||
Health - Player Register Server || players register on servers per day/server on average.
|
||||
Health - Player Visit Server || players visit on servers per day/server on average.
|
||||
Health - Regular Activity Change || Number of regular players has
|
||||
Health - Regular Activity Change Decrease || decreased (${0})
|
||||
Health - Regular Activity Change Increase || increased (+${0})
|
||||
Health - Regular Activity Change Zero || stayed the same (+${0})
|
||||
Health - Regular Activity Remain || ${0} of regular players have remained active (${1}/${2})
|
||||
Health - Single Servers Inaccuracy || Single Bukkit/Sponge server to gather session data.
|
||||
Health - TPS Above Low Threshold || Average TPS was above Low Threshold ${0} of the time
|
||||
Health - TPS Low Dips || Average TPS dropped below Low Threshold (${0}) ${1} times
|
||||
HTML - FREE_DISK_SPACE || Free Disk Space
|
||||
HTML - DISK_SPACE || DISK SPACE
|
@ -313,23 +313,5 @@ WebServer FAIL - SSL Context || Web Palvelin: SSL Kontekstin
|
||||
WebServer FAIL - Store Load || Web Palvelin: SSL Sertifikaatin lataus ei onnistunut.
|
||||
Yesterday || 'Eilen'
|
||||
Today || 'Tänään'
|
||||
Health - Active Playtime Comparison Decrease || Aktiivisilta pelaajilta voi olla loppumassa tekeminen (Pelasivat ${0} vs ${1}, viimeisen kahden viikon vs viikot 2-4)
|
||||
Health - Active Playtime Comparison Increase || Aktiivisilta pelaajilta vaikuttaa olevan tekemistä (Pelasivat ${0} vs ${1}, viimeisen kahden viikon vs viikot 2-4)
|
||||
Health - Downtime || Palvelimen downtime (Ei Dataa) oli ${0}
|
||||
Health - New Player Join Players, No || Uusilla pelaajilla voi olla yksinäistä (${0} paikalla keskimäärin)
|
||||
Health - New Player Join Players, Yes || Uusilla pelaajilla on kavereita liittyessä (${0} paikalla keskimäärin)
|
||||
Health - New Player Stickiness || ${0} uusista pelaajista jäi pelaamaan (${1}/${2})
|
||||
Health - No Servers Inaccuracy || Ei Bukkit/Sponge palvelimia sessio tietojen keräykseen - Nämä arviot ovat epätarkkoja.
|
||||
Health - Player Play on Network || pelaajaa pelasi verkossa:
|
||||
Health - Player Register Server || pelaajaa rekisteröityi palvelimille per päivä/palvelin keskimäärin.
|
||||
Health - Player Visit Server || pelaajaa käy palvelimilla per päivä/palvelin keskimäärin.
|
||||
Health - Regular Activity Change || Kestopelaajien määrä on
|
||||
Health - Regular Activity Change Decrease || pienentynyt (${0})
|
||||
Health - Regular Activity Change Increase || kasvanut (+${0})
|
||||
Health - Regular Activity Change Zero || pysynyt samana (+${0})
|
||||
Health - Regular Activity Remain || ${0} kestopelaajista on pysynyt aktiivisena (${1}/${2})
|
||||
Health - Single Servers Inaccuracy || Yksi Bukkit/Sponge palvelin sessio tietojen keräykseen.
|
||||
Health - TPS Above Low Threshold || Keskimääräinen TPS oli alarajan yläpuolella ${0} ajasta
|
||||
Health - TPS Low Dips || Keskimääräinen TPS putosi alarajan alapuolelle (${0}) ${1} kertaa
|
||||
HTML - FREE_DISK_SPACE || Vapaa Levytila
|
||||
HTML - DISK_SPACE || LEVYTILA
|
@ -314,23 +314,5 @@ WebServer FAIL - SSL Context || Serveur Web : Échec d'initia
|
||||
WebServer FAIL - Store Load || Serveur Web : Échec du chargement du certificat SSL.
|
||||
Yesterday || 'Hier'
|
||||
Today || 'Aujourd''hui'
|
||||
Health - Active Playtime Comparison Decrease || Les joueurs actifs risquent de manquer de choses à faire (Joué ${0} contre ${1}, les deux dernières semaines par rapport aux semaines 2 à 4).
|
||||
Health - Active Playtime Comparison Increase || Les joueurs actifs semblent avoir des choses à faire (Joué ${0} contre ${1}, les deux dernières semaines par rapport aux semaines 2 à 4).
|
||||
Health - Downtime || Le temps total d'arrêt du serveur (absence de données) était de ${0}.
|
||||
Health - New Player Join Players, No || Les nouveaux joueurs peuvent ne pas avoir de joueurs avec lesquels jouer (${0} en moyenne).
|
||||
Health - New Player Join Players, Yes || Les nouveaux joueurs ont des joueurs avec lesquels jouer (${0} en moyenne).
|
||||
Health - New Player Stickiness || ${0} des nouveaux joueurs sont restés (${1}/${2}).
|
||||
Health - No Servers Inaccuracy || Aucun serveur Bukkit/Sponge pour collecter des données de session - Ces mesures sont inexactes.
|
||||
Health - Player Play on Network || joueurs jouent sur le réseau :
|
||||
Health - Player Register Server || joueurs s'enregistrent surle serveur par jour/serveur en moyenne.
|
||||
Health - Player Visit Server || joueurs visitent le serveur par jour/serveur en moyenne.
|
||||
Health - Regular Activity Change || Le nombre de joueurs réguliers a
|
||||
Health - Regular Activity Change Decrease || diminué (${0}).
|
||||
Health - Regular Activity Change Increase || augmenté (+${0}).
|
||||
Health - Regular Activity Change Zero || stagné (+/-${0}).
|
||||
Health - Regular Activity Remain || ${0} des joueurs réguliers sont restés actifs (${1}/${2}).
|
||||
Health - Single Servers Inaccuracy || Un seul serveur Bukkit/Sponge pour collecter les données de session.
|
||||
Health - TPS Above Low Threshold || Les TPS moyens étaient supérieurs au seuil bas ${0} du temps.
|
||||
Health - TPS Low Dips || Les TPS moyens sont descendus sous le seuil bas (${0}) ${1} fois.
|
||||
HTML - FREE_DISK_SPACE || Espace disque disponible
|
||||
HTML - DISK_SPACE || ESPACE DISQUE
|
||||
|
@ -109,24 +109,6 @@ Enable FAIL - Database Patch || データベースのパッ
|
||||
Enable FAIL - GeoDB Write || ダウンロードした「GeoLite2」の位置情報データベースを保存中に何らかのエラーが発生しました
|
||||
Enable FAIL - WebServer (Bungee) || ウェブサーバーの初期化に失敗しました!
|
||||
Enable FAIL - Wrong Database Type || ${0}はサポートされていないデータベースです
|
||||
Health - Active Playtime Comparison Decrease || よくログインしているプレイヤーのやることが少なくなっている可能性があります (直近2週間のアクティブ時間が${0}に対し、1ヶ月~2週間のアクティブ時間が${1}です)
|
||||
Health - Active Playtime Comparison Increase || よくログインしているプレイヤーのやるべきことがある可能性があります (直近2週間のアクティブ時間が${0}に対し、1ヶ月~2週間のアクティブ時間が${1}です)
|
||||
Health - Downtime || サーバーの合計停止時間(データが存在しない)が${0}です
|
||||
Health - New Player Join Players, No || 新規プレイヤーが参加時、一緒にプレイするプレイヤーがいないかもしれません。(平均${0}人のプレイヤーがオンラインです)
|
||||
Health - New Player Join Players, Yes || 新規プレイヤーが参加時、一緒にプレイするプレイヤーがいます。(平均${0}人のプレイヤーがオンラインです)
|
||||
Health - New Player Stickiness || ${0}人の新規プレイヤーが行き詰詰まっています。(${1}/${2})
|
||||
Health - No Servers Inaccuracy || セッションデータを収集するBukkit/Spongeサーバーが接続されていません - 不正確なデータが表示されます
|
||||
Health - Player Play on Network || 人のプレイヤーがネットワーク上でプレイしています:
|
||||
Health - Player Register Server || 人のプレイヤーが1日あたり登録されています。以下サーバーごとの1日の登録数:
|
||||
Health - Player Visit Server || 人のプレイヤーが1日あたりこのサーバーに接続しています。以下サーバーごとの1日の接続数:
|
||||
Health - Regular Activity Change || しばしばログインしているプレイヤー数は
|
||||
Health - Regular Activity Change Decrease || ${0}人減少しました (-${0}人)
|
||||
Health - Regular Activity Change Increase || ${0}人増加しました (+${0}人)
|
||||
Health - Regular Activity Change Zero || 変化していません (+${0}人)
|
||||
Health - Regular Activity Remain || ${0}人のしばしばログインしているプレイヤーはよくログインするようになりました(${1}/${2})
|
||||
Health - Single Servers Inaccuracy || セッションデータを収集するためのBukkit/Spongeサーバーが1つしか存在しません
|
||||
Health - TPS Above Low Threshold || 平均TPSの${0}が平均TPSの下限しきい値より高い値を示しています
|
||||
Health - TPS Low Dips || 平均TPSの下限しきい値を下回った回数:${1}回(以前の値:${0}回)
|
||||
HTML - ACTIVITY_INDEX || 活動指数
|
||||
HTML - ALL || 全て
|
||||
HTML - ALL_TIME_PEAK || 全体のピークタイム
|
||||
|
@ -314,23 +314,5 @@ WebServer FAIL - SSL Context || Servidor Web: Falha ao inicia
|
||||
WebServer FAIL - Store Load || Servidor Web: Falha ao carregar certificado SSL.
|
||||
Yesterday || 'Ontem'
|
||||
Today || 'Hoje'
|
||||
Health - Active Playtime Comparison Decrease || Jogadores ativos podem estar ficando sem coisas para fazer (Jogaram ${0} vs ${1}, últimas duas semanas vs últimas quatro semanas)
|
||||
Health - Active Playtime Comparison Increase || Jogadores ativos parecem ter coisas para fazer (Jogaram ${0} vs ${1}, últimas duas semanas vs últimas quatro semanas)
|
||||
Health - Downtime || O tempo de indisponibilidade total do servidor (sem dados) foi de ${0}
|
||||
Health - New Player Join Players, No || Novos jogadores podem estar descontentes por verem o servidor com poucos jogadores ao entrar (${0} em média)
|
||||
Health - New Player Join Players, Yes || Novos jogadores devem estar felizes ao entrar no servidores com muitos jogadores (${0} em média)
|
||||
Health - New Player Stickiness || ${0} de novos jogadores ficaram no servidor pra jogar um pouco (${1}/${2})
|
||||
Health - No Servers Inaccuracy || Nenhum servidor Bukkit/Sponge para pegar dados de sessões - Essas medidas são imprecisas.
|
||||
Health - Player Play on Network || jogadores que jogaram na network:
|
||||
Health - Player Register Server || registros de jogadores no servidor por dia / servidor em média.
|
||||
Health - Player Visit Server || visitas de jogadores no servidor por dia / servidor em médio.
|
||||
Health - Regular Activity Change || Número de jogadores regulares é de
|
||||
Health - Regular Activity Change Decrease || diminuiu (${0})
|
||||
Health - Regular Activity Change Increase || aumentou (+${0})
|
||||
Health - Regular Activity Change Zero || permaneceu o mesmo (+${0})
|
||||
Health - Regular Activity Remain || ${0} de jogadores regulares permaneceram ativos (${1}/${2})
|
||||
Health - Single Servers Inaccuracy || Único servidor Bukkit/Sponge para pegar dados de sessões.
|
||||
Health - TPS Above Low Threshold || O TPS médio esteve acima do limite de segurança ${0} do tempo
|
||||
Health - TPS Low Dips || O TPS médio esteve abaixo do limite de segurança (${0}) ${1} vezes
|
||||
HTML - FREE_DISK_SPACE || Espaço de Disco Livre
|
||||
HTML - DISK_SPACE || ESPAÇO DE DISCO
|
Loading…
Reference in New Issue
Block a user