New Html, Rewrote Config, Deprecated some Settings enums

This commit is contained in:
Rsl1122 2017-08-20 12:20:01 +03:00
parent 1709ba394e
commit ff3fb9eac1
37 changed files with 3119 additions and 2352 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.djrapitops</groupId> <groupId>com.djrapitops</groupId>
<artifactId>Plan</artifactId> <artifactId>Plan</artifactId>
<version>3.6.3</version> <version>4.0.0</version>
<build> <build>
<sourceDirectory>${basedir}/src</sourceDirectory> <sourceDirectory>${basedir}/src</sourceDirectory>
<testSourceDirectory>${basedir}/test</testSourceDirectory> <testSourceDirectory>${basedir}/test</testSourceDirectory>

View File

@ -107,10 +107,28 @@
<directory>${basedir}/src/main/resources</directory> <directory>${basedir}/src/main/resources</directory>
<includes> <includes>
<include>*.keystore</include> <include>*.keystore</include>
<include>*.js</include> <include>*.css</include>
<include>*.yml</include> <include>*.yml</include>
</includes>
<excludes>
<exclude>licence.yml</exclude>
</excludes>
</resource>
<resource>
<targetPath>.</targetPath>
<directory>${basedir}/src/main/resources/html</directory>
<includes>
<include>*.html</include> <include>*.html</include>
<include>*.txt</include> </includes>
<excludes>
<exclude>*Example*</exclude>
</excludes>
</resource>
<resource>
<targetPath>.</targetPath>
<directory>${basedir}/src/main/resources/js</directory>
<includes>
<include>*.js</include>
</includes> </includes>
</resource> </resource>
</resources> </resources>

View File

@ -44,7 +44,6 @@ import main.java.com.djrapitops.plan.ui.webserver.api.bukkit.*;
import main.java.com.djrapitops.plan.utilities.Benchmark; import main.java.com.djrapitops.plan.utilities.Benchmark;
import main.java.com.djrapitops.plan.utilities.Check; import main.java.com.djrapitops.plan.utilities.Check;
import main.java.com.djrapitops.plan.utilities.MiscUtils; import main.java.com.djrapitops.plan.utilities.MiscUtils;
import main.java.com.djrapitops.plan.utilities.metrics.BStats;
import main.java.com.djrapitops.plan.utilities.webserver.api.WebAPIManager; import main.java.com.djrapitops.plan.utilities.webserver.api.WebAPIManager;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -277,25 +276,11 @@ public class Plan extends BukkitPlugin<Plan> {
private void registerListeners() { private void registerListeners() {
Benchmark.start("Register Listeners"); Benchmark.start("Register Listeners");
registerListener(new PlanPlayerListener(this)); registerListener(new PlanPlayerListener(this));
boolean chatListenerIsEnabled = Check.isTrue(Settings.GATHERCHAT.isTrue(), Locale.get(Msg.ENABLE_NOTIFY_DISABLED_CHATLISTENER).toString()); registerListener(new PlanChatListener(this));
boolean commandListenerIsEnabled = Check.isTrue(Settings.GATHERCOMMANDS.isTrue(), Locale.get(Msg.ENABLE_NOTIFY_DISABLED_COMMANDLISTENER).toString());
boolean deathListenerIsEnabled = Check.isTrue(Settings.GATHERKILLS.isTrue(), Locale.get(Msg.ENABLE_NOTIFY_DISABLED_DEATHLISTENER).toString());
if (chatListenerIsEnabled) {
registerListener(new PlanChatListener(this));
}
registerListener(new PlanGamemodeChangeListener(this)); registerListener(new PlanGamemodeChangeListener(this));
registerListener(new PlanWorldChangeListener(this)); registerListener(new PlanWorldChangeListener(this));
registerListener(new PlanCommandPreprocessListener(this));
if (commandListenerIsEnabled) { registerListener(new PlanDeathEventListener(this));
registerListener(new PlanCommandPreprocessListener(this));
}
if (deathListenerIsEnabled) {
registerListener(new PlanDeathEventListener(this));
}
Benchmark.stop("Enable", "Register Listeners"); Benchmark.stop("Enable", "Register Listeners");
} }

View File

@ -11,85 +11,107 @@ import java.util.List;
*/ */
public enum Settings { public enum Settings {
// Boolean // Boolean
WEBSERVER_ENABLED("Settings.WebServer.Enabled"), BUNGEE_COPY_CONFIG("Bungee-Override.CopyBungeeConfig"),
ANALYSIS_REFRESH_ON_ENABLE("Settings.Cache.AnalysisCache.RefreshAnalysisCacheOnEnable"), BUNGEE_OVERRIDE_STANDALONE_MODE("Bungee-Override.StandaloneMode"),
ANALYSIS_LOG_TO_CONSOLE("Settings.Analysis.LogProgressOnConsole"), @Deprecated WEBSERVER_ENABLED("Settings.WebServer.Enabled"),
ANALYSIS_LOG_FINISHED("Settings.Analysis.NotifyWhenFinished"), @Deprecated ANALYSIS_REFRESH_ON_ENABLE("Settings.Cache.AnalysisCache.RefreshAnalysisCacheOnEnable"),
ANALYSIS_EXPORT("Settings.Analysis.Export.Enabled"), @Deprecated ANALYSIS_LOG_TO_CONSOLE("Settings.Analysis.LogProgressOnConsole"),
SHOW_ALTERNATIVE_IP("Settings.WebServer.ShowAlternativeServerIP"), @Deprecated ANALYSIS_LOG_FINISHED("Settings.Analysis.NotifyWhenFinished"),
USE_ALTERNATIVE_UI("Settings.UseTextUI"), ANALYSIS_EXPORT("Analysis.Export.Enabled"),
GATHERCHAT("Settings.Data.ChatListener"), SHOW_ALTERNATIVE_IP("Commands.AlternativeIP.Enabled"),
GATHERKILLS("Settings.Data.GatherKillData"), @Deprecated USE_ALTERNATIVE_UI("Settings.UseTextUI"),
GATHERCOMMANDS("Settings.Data.GatherCommandUsage"), LOG_UNKNOWN_COMMANDS("DAta.Commands.LogUnknownCommands"),
DO_NOT_LOG_UNKNOWN_COMMANDS("Customization.Data.DoNotLogUnknownCommands"), COMBINE_COMMAND_ALIASES("Data.Commands.CombineCommandAliases"),
COMBINE_COMMAND_ALIASES_TO_MAIN_COMMAND("Customization.Data.CombineCommandAliasesToMainCommand"), @Deprecated SECURITY_IP_UUID("Settings.WebServer.Security.DisplayIPsAndUUIDs"),
SECURITY_IP_UUID("Settings.WebServer.Security.DisplayIPsAndUUIDs"), @Deprecated PLAYERLIST_SHOW_IMAGES("Customization.SmallHeadImagesOnAnalysisPlayerlist"),
PLAYERLIST_SHOW_IMAGES("Customization.SmallHeadImagesOnAnalysisPlayerlist"), WRITE_NEW_LOCALE("Plugin.WriteNewLocaleFileOnStart"),
WRITE_NEW_LOCALE("Settings.WriteNewLocaleFileOnStart"),
// Integer // Integer
ANALYSIS_MINUTES_FOR_ACTIVE("Settings.Analysis.MinutesPlayedUntilConsidiredActive"), @Deprecated ANALYSIS_MINUTES_FOR_ACTIVE("Settings.Analysis.MinutesPlayedUntilConsidiredActive"),
SAVE_CACHE_MIN("Settings.Cache.DataCache.SaveEveryXMinutes"), @Deprecated SAVE_CACHE_MIN("Settings.Cache.DataCache.SaveEveryXMinutes"),
CLEAR_INSPECT_CACHE("Settings.Cache.InspectCache.ClearFromInspectCacheAfterXMinutes"), @Deprecated CLEAR_INSPECT_CACHE("Settings.Cache.InspectCache.ClearFromInspectCacheAfterXMinutes"),
CLEAR_CACHE_X_SAVES("Settings.Cache.DataCache.ClearCacheEveryXSaves"), @Deprecated CLEAR_CACHE_X_SAVES("Settings.Cache.DataCache.ClearCacheEveryXSaves"),
WEBSERVER_PORT("Settings.WebServer.Port"), WEBSERVER_PORT("WebServer.Port"),
ANALYSIS_AUTO_REFRESH("Settings.Cache.AnalysisCache.RefreshEveryXMinutes"), ANALYSIS_AUTO_REFRESH("Analysis.AutoRefreshPeriod"),
PROCESS_GET_LIMIT("Settings.Cache.Processing.GetLimit"), @Deprecated PROCESS_GET_LIMIT("Settings.Cache.Processing.GetLimit"),
PROCESS_SAVE_LIMIT("Settings.Cache.Processing.SaveLimit"), @Deprecated PROCESS_SAVE_LIMIT("Settings.Cache.Processing.SaveLimit"),
PROCESS_CLEAR_LIMIT("Settings.Cache.Processing.ClearLimit"), @Deprecated PROCESS_CLEAR_LIMIT("Settings.Cache.Processing.ClearLimit"),
TPS_GRAPH_HIGH("Customization.Colors.HTML.TPSGraph.TPSHigh"), @Deprecated TPS_GRAPH_HIGH("Customization.Colors.HTML.TPSGraph.TPSHigh"),
TPS_GRAPH_MED("Customization.Colors.HTML.TPSGraph.TPSMedium"), @Deprecated TPS_GRAPH_MED("Customization.Colors.HTML.TPSGraph.TPSMedium"),
// String // String
DEBUG("Settings.Debug"), DEBUG("Plugin.Debug"),
ALTERNATIVE_IP("Settings.WebServer.AlternativeIP"), ALTERNATIVE_IP("Commands.AlternativeIP.Link"),
DB_TYPE("database.type"), DB_TYPE("Database.Type"),
DEM_TRIGGERS("Customization.DemographicsTriggers.Trigger"), LOCALE("Plugin.Locale"),
DEM_FEMALE("Customization.DemographicsTriggers.Female"), WEBSERVER_IP("WebServer.InternalIP"),
DEM_MALE("Customization.DemographicsTriggers.Male"), ANALYSIS_EXPORT_PATH("Analysis.Export.DestinationFolder"),
DEM_IGNORE("Customization.DemographicsTriggers.IgnoreWhen"), WEBSERVER_CERTIFICATE_PATH("WebServer.Security.Certificate.KeyStorePath"),
LOCALE("Settings.Locale"), WEBSERVER_CERTIFICATE_KEYPASS("WebServer.Security.Certificate.KeyPass"),
WEBSERVER_IP("Settings.WebServer.InternalIP"), WEBSERVER_CERTIFICATE_STOREPASS("WebServer.Security.Certificate.StorePass"),
ANALYSIS_EXPORT_PATH("Settings.Analysis.Export.DestinationFolder"), WEBSERVER_CERTIFICATE_ALIAS("WebServer.Security.Certificate.Alias"),
WEBSERVER_CERTIFICATE_PATH("Settings.WebServer.Security.Certificate.KeyStorePath"), ETERNAL_WEBSERVER_LINK_PROTOCOL("Analysis.Export.ExternalWebServerLinkProtocol"),
WEBSERVER_CERTIFICATE_KEYPASS("Settings.WebServer.Security.Certificate.KeyPass"),
WEBSERVER_CERTIFICATE_STOREPASS("Settings.WebServer.Security.Certificate.StorePass"),
WEBSERVER_CERTIFICATE_ALIAS("Settings.WebServer.Security.Certificate.Alias"),
LINK_PROTOCOL("Settings.WebServer.ExternalWebServerLinkProtocol"),
// //
SERVER_NAME("Customization.ServerName"), SERVER_NAME("Server.ServerName"),
// //
FORMAT_YEAR("Customization.Formats.TimeAmount.Year"), FORMAT_YEAR("Customization.Formatting.TimeAmount.Year"),
FORMAT_YEARS("Customization.Formats.TimeAmount.Years"), FORMAT_YEARS("Customization.Formatting.TimeAmount.Years"),
FORMAT_DAY("Customization.Formats.TimeAmount.Day"), FORMAT_MONTH("Customization.Formatting.TimeAmount.Month"),
FORMAT_DAYS("Customization.Formats.TimeAmount.Days"), FORMAT_MONTHS("Customization.Formatting.TimeAmount.Months"),
FORMAT_HOURS("Customization.Formats.TimeAmount.Hours"), FORMAT_DAY("Customization.Formatting.TimeAmount.Day"),
FORMAT_MINUTES("Customization.Formats.TimeAmount.Minutes"), FORMAT_DAYS("Customization.Formatting.TimeAmount.Days"),
FORMAT_SECONDS("Customization.Formats.TimeAmount.Seconds"), FORMAT_HOURS("Customization.Formatting.TimeAmount.Hours"),
FORMAT_DECIMALS("Customization.Formats.DecimalPoints"), FORMAT_MINUTES("Customization.Formatting.TimeAmount.Minutes"),
FORMAT_SECONDS("Customization.Formatting.TimeAmount.Seconds"),
FORMAT_DECIMALS("Customization.Formatting.DecimalPoints"),
// //
COLOR_MAIN("Customization.Colors.Commands.Main"), COLOR_MAIN("Commands.Colors.Main"),
COLOR_SEC("Customization.Colors.Commands.Secondary"), COLOR_SEC("Commands.Colors.Secondary"),
COLOR_TER("Customization.Colors.Commands.Highlight"), COLOR_TER("Commands.Colors.Highlight"),
// //
HCOLOR_MAIN("Customization.Colors.HTML.UI.Main"), THEME_BASE("Theme.Base"),
HCOLOR_MAIN_DARK("Customization.Colors.HTML.UI.MainDark"), THEME_FONT_STYLESHEET("Theme.Font.FontStyleSheet"),
HCOLOR_SEC("Customization.Colors.HTML.UI.Secondary"), THEME_FONT_FAMILY("Theme.Font.FontFamily"),
HCOLOR_TER("Customization.Colors.HTML.UI.Tertiary"), THEME_FONT_COLOR_DARK("Theme.Font.Dark"),
HCOLOR_TER_DARK("Customization.Colors.HTML.UI.TertiaryDark"), THEME_FONT_COLOR_LIGHT("Theme.Font.Light"),
HCOLOR_TPS_HIGH("Customization.Colors.HTML.TPSGraph.TPSHighCol"), THEME_COLOR_MAIN("Theme.Colors.Main"),
HCOLOR_TPS_MED("Customization.Colors.HTML.TPSGraph.TPSMediumCol"), THEME_COLOR_SECONDARY("Theme.Colors.Secondary"),
HCOLOR_TPS_LOW("Customization.Colors.HTML.TPSGraph.TPSLowCol"), THEME_COLOR_SECONDARY_DARK("Theme.Colors.Secondary-Dark"),
HCOLOR_ACT_ONL("Customization.Colors.HTML.ActivityGraph.OnlinePlayers"), THEME_COLOR_TERTIARY("Theme.Colors.Tertiary"),
HCOLOR_ACTP_ACT("Customization.Colors.HTML.ActivityPie.Active"), THEME_COLOR_BACKGROUND("Theme.Colors.Background"),
HCOLOR_ACTP_BAN("Customization.Colors.HTML.ActivityPie.Banned"), THEME_COLOR_TABLE_DARK("Theme.Colors.Table-Dark"),
HCOLOR_ACTP_INA("Customization.Colors.HTML.ActivityPie.Inactive"), THEME_COLOR_TABLE_LIGHT("Theme.Colors.Table-Light"),
HCOLOR_ACTP_JON("Customization.Colors.HTML.ActivityPie.JoinedOnce"), THEME_GRAPH_PUNCHCARD("Theme.Graphs.PunchCard"),
HCOLOR_GMP_0("Customization.Colors.HTML.GamemodePie.Survival"), THEME_GRAPH_PLAYERS_ONLINE("Theme.Graphs.PlayersOnline"),
HCOLOR_GMP_1("Customization.Colors.HTML.GamemodePie.Creative"), THEME_GRAPH_TPS_THRESHOLD_HIGH("Theme.Graphs.TPS.High-Threshold"),
HCOLOR_GMP_2("Customization.Colors.HTML.GamemodePie.Adventure"), THEME_GRAPH_TPS_THRESHOLD_MED("Theme.Graphs.TPS.Medium-Threshold"),
HCOLOR_GMP_3("Customization.Colors.HTML.GamemodePie.Spectator"), THEME_GRAPH_TPS_HIGH("Theme.Graphs.TPS.High"),
THEME_GRAPH_TPS_MED("Theme.Graphs.TPS.Medium"),
THEME_GRAPH_TPS_LOW("Theme.Graphs.TPS.Low"),
THEME_GRAPH_CPU("Theme.Graphs.CPU"),
THEME_GRAPH_RAM("Theme.Graphs.RAM"),
THEME_GRAPH_CHUNKS("Theme.Graphs.Chunks"),
THEME_GRAPH_ENTITIES("Theme.Graphs.Entities"),
//
@Deprecated HCOLOR_MAIN("Customization.Colors.HTML.UI.Main"),
@Deprecated HCOLOR_MAIN_DARK("Customization.Colors.HTML.UI.MainDark"),
@Deprecated HCOLOR_SEC("Customization.Colors.HTML.UI.Secondary"),
@Deprecated HCOLOR_TER("Customization.Colors.HTML.UI.Tertiary"),
@Deprecated HCOLOR_TER_DARK("Customization.Colors.HTML.UI.TertiaryDark"),
@Deprecated HCOLOR_TPS_HIGH("Customization.Colors.HTML.TPSGraph.TPSHighCol"),
@Deprecated HCOLOR_TPS_MED("Customization.Colors.HTML.TPSGraph.TPSMediumCol"),
@Deprecated HCOLOR_TPS_LOW("Customization.Colors.HTML.TPSGraph.TPSLowCol"),
@Deprecated HCOLOR_ACT_ONL("Customization.Colors.HTML.ActivityGraph.OnlinePlayers"),
@Deprecated HCOLOR_ACTP_ACT("Customization.Colors.HTML.ActivityPie.Active"),
@Deprecated HCOLOR_ACTP_BAN("Customization.Colors.HTML.ActivityPie.Banned"),
@Deprecated HCOLOR_ACTP_INA("Customization.Colors.HTML.ActivityPie.Inactive"),
@Deprecated HCOLOR_ACTP_JON("Customization.Colors.HTML.ActivityPie.JoinedOnce"),
@Deprecated HCOLOR_GMP_0("Customization.Colors.HTML.GamemodePie.Survival"),
@Deprecated HCOLOR_GMP_1("Customization.Colors.HTML.GamemodePie.Creative"),
@Deprecated HCOLOR_GMP_2("Customization.Colors.HTML.GamemodePie.Adventure"),
@Deprecated HCOLOR_GMP_3("Customization.Colors.HTML.GamemodePie.Spectator"),
// StringList // StringList
HIDE_FACTIONS("Customization.Plugins.Factions.HideFactions"), HIDE_FACTIONS("Plugins.Factions.HideFactions"),
HIDE_TOWNS("Customization.Plugins.Towny.HideTowns"); HIDE_TOWNS("Plugins.Towny.HideTowns");
private final String configPath; private final String configPath;
private Boolean value; private Boolean value;

View File

@ -28,7 +28,7 @@ public class DataCacheClearQueue extends Queue<UUID> {
* @param handler current instance of DataCacheHandler. * @param handler current instance of DataCacheHandler.
*/ */
public DataCacheClearQueue(DataCacheHandler handler) { public DataCacheClearQueue(DataCacheHandler handler) {
super(new ArrayBlockingQueue<>(Settings.PROCESS_CLEAR_LIMIT.getNumber())); super(new ArrayBlockingQueue<>(20000));
setup = new ClearSetup(queue, handler); setup = new ClearSetup(queue, handler);
setup.go(); setup.go();
} }

View File

@ -27,7 +27,7 @@ public class DataCacheGetQueue extends Queue<Map<UUID, List<DBCallableProcessor>
* @param plugin current instance of Plan * @param plugin current instance of Plan
*/ */
public DataCacheGetQueue(Plan plugin) { public DataCacheGetQueue(Plan plugin) {
super(new ArrayBlockingQueue<>(Settings.PROCESS_GET_LIMIT.getNumber())); super(new ArrayBlockingQueue<>(20000));
setup = new GetSetup(queue, plugin.getDB()); setup = new GetSetup(queue, plugin.getDB());
setup.go(); setup.go();
} }

View File

@ -30,7 +30,7 @@ public class DataCacheSaveQueue extends Queue<UserData> {
* @param handler DataCacheHandler * @param handler DataCacheHandler
*/ */
public DataCacheSaveQueue(Plan plugin, DataCacheHandler handler) { public DataCacheSaveQueue(Plan plugin, DataCacheHandler handler) {
super(new ArrayBlockingQueue<>(Settings.PROCESS_SAVE_LIMIT.getNumber())); super(new ArrayBlockingQueue<>(20000));
setup = new SaveSetup(queue, handler, plugin.getDB()); setup = new SaveSetup(queue, handler, plugin.getDB());
setup.go(); setup.go();
} }

View File

@ -45,8 +45,8 @@ public class PlanCommandPreprocessListener implements Listener {
String commandName = event.getMessage().substring(1).split(" ")[0].toLowerCase(); String commandName = event.getMessage().substring(1).split(" ")[0].toLowerCase();
boolean doNotLogUnknownCommands = Settings.DO_NOT_LOG_UNKNOWN_COMMANDS.isTrue(); boolean doNotLogUnknownCommands = Settings.LOG_UNKNOWN_COMMANDS.isTrue();
boolean combineCommandAliasesToMainCommand = Settings.COMBINE_COMMAND_ALIASES_TO_MAIN_COMMAND.isTrue(); boolean combineCommandAliasesToMainCommand = Settings.COMBINE_COMMAND_ALIASES.isTrue();
if (doNotLogUnknownCommands || combineCommandAliasesToMainCommand) { if (doNotLogUnknownCommands || combineCommandAliasesToMainCommand) {
Command command = plugin.getServer().getPluginCommand(commandName); Command command = plugin.getServer().getPluginCommand(commandName);

View File

@ -79,7 +79,7 @@ public class HtmlUtils {
private static String getProtocol() { private static String getProtocol() {
WebServer uiServer = Plan.getInstance().getUiServer(); WebServer uiServer = Plan.getInstance().getUiServer();
return uiServer.isEnabled() ? uiServer.getProtocol() : Settings.LINK_PROTOCOL.toString(); return uiServer.isEnabled() ? uiServer.getProtocol() : Settings.ETERNAL_WEBSERVER_LINK_PROTOCOL.toString();
} }
/** /**

View File

@ -204,12 +204,8 @@ public class DumpUtils {
boolean analysisExport = Settings.ANALYSIS_EXPORT.isTrue(); boolean analysisExport = Settings.ANALYSIS_EXPORT.isTrue();
boolean usingAlternativeServerIP = Settings.USE_ALTERNATIVE_UI.isTrue(); boolean usingAlternativeServerIP = Settings.USE_ALTERNATIVE_UI.isTrue();
boolean chatGathering = Settings.GATHERCHAT.isTrue(); boolean combineAliases = Settings.COMBINE_COMMAND_ALIASES.isTrue();
boolean killGathering = Settings.GATHERKILLS.isTrue(); boolean unknownCommandLogging = Settings.LOG_UNKNOWN_COMMANDS.isTrue();
boolean commandGathering = Settings.GATHERCOMMANDS.isTrue();
boolean combineAliases = Settings.COMBINE_COMMAND_ALIASES_TO_MAIN_COMMAND.isTrue();
boolean unknownCommandLogging = Settings.DO_NOT_LOG_UNKNOWN_COMMANDS.isTrue();
String locale = Settings.LOCALE.toString(); String locale = Settings.LOCALE.toString();
String dbType = Settings.DB_TYPE.toString(); String dbType = Settings.DB_TYPE.toString();
@ -222,10 +218,6 @@ public class DumpUtils {
log.add("Analysis Export", analysisExport); log.add("Analysis Export", analysisExport);
log.add("Alternative Server IP", usingAlternativeServerIP); log.add("Alternative Server IP", usingAlternativeServerIP);
log.add("Chat Gathering", chatGathering);
log.add("Kill Gathering", killGathering);
log.add("Command Gathering", commandGathering);
log.add("Combine Aliases", combineAliases); log.add("Combine Aliases", combineAliases);
log.add("Unknown Command Logging", unknownCommandLogging); log.add("Unknown Command Logging", unknownCommandLogging);
log.add("Locale", locale); log.add("Locale", locale);

View File

@ -0,0 +1,169 @@
Placeholders:
${}
player.html:
${playerName}
${serverName}
${version}
${playerClassification} (Active &#x2022; Offline etc)
${nicknames} &#x2022; name<br>
${geolocations} &#x2022; country<br>
${registered} time format full
${lastSeen} time format full
${sessionCount} num
${playtimeTotal} timeamount
${sessionLengthMedian} timeamount
${sessionLengthLongest} timeamount
${kickCount} num
${playerKillCount} num
${mobKillCount} num
${deathCount} num
${sessionCountDay} num
${sessionCountWeek} num
${playtimeDay} timeamount
${playtimeWeek} timeamount
${sessionLengthLongestDay} timeamount
${sessionLengthLongestWeek} timeamount
${contentSessions} See example page
${contentServerOverview} See example page
${tabContentPlugins} See example page
${tableBodyActions} (3) (100)
punchcard
serverPie
worldPie
network.html:
${networkName}
${playersOnlineSeries}
${version}
${playersOnline} num
${playersMax} num
${playersTotal} num
${playersActive} num
${playersNewDay} num
${playersNewWeek} num
${contentServers} row[column[box-header, box, box-footer[p,button right, refresh button right]], column...], row...
server.html:
${serverName} String
${timeZone} num
${playersOnline} num
${playersMax} num
${playersTotal} num
${playersActive} num
${playersAverage} num
${playersNewAverage} num
${playersDay} num
${playersWeek} num
${playersMonth} num
${playersAverageDay} num
${playersAverageWeek} num
${playersAverageMonth} num
${playersNewDay} num
${playersNewWeek} num
${playersNewMonth} num
${playersNewAverageDay} num
${playersNewAverageWeek} num
${playersNewAverageMonth} num
${lastPeakTime} time format hh:mm
${playersLastPeak} num
${bestPeakTime} time format full
${playersBestPeak} num
${sessionAverage} timeamount
${playtimeTotal} timeamount
${sessionCount} num
${killCount} num
${mobKillCount} num
${deathCount} num
${tpsAverageDay} num
${tpsAverageWeek} num
${cpuAverageDay} num%
${cpuAverageWeek} num%
${ramAverageDay} num MB
${ramAverageWeek} num MB
${entityAverageDay} num
${entityAverageWeek} num
${chunkAverageDay} num
${chunkAverageWeek} num
${tableBodyRecentLogins} tr th html (2) (15-20)
${tableBodySessions} tr th html (4) (50)
${tableBodyPlayerList} tr th html (7) (250)
${tableBodyCommands} tr th html (2) (100)
${playersOnlineSeries}
${tpsSeries}
${cpuSeries}
${ramSeries}
${entitySeries}
${chunkSeries}
${worldSeries}
${geoMapSeries}
${sessionLengthSeries}
${punchCardSeries}
${playersGraphColor}
${gmData}
${gmTotal} timeamount
${gmColors}
${active}
${inactive}
${joinLeaver}
${banned}
${activityColors}
${worldTotal} timeamount
${worldColors} NOT IMPLEMENTED //TODO
${tpsMedium}
${tpsHigh}
${tpsLowColor}
${tpsMediumColor}
${tpsHighColor}
${tabContentPlugins} row[column[box-header[h2[i, text]],box plugin], column...], row... + style="width: 200%;" <h2>That's all..</h2> <p>Do you have more plugins? ._.</p>
STYLE:
#267f00 - Theme
#222 - Punchcard
#89c471 - Theme (+sessionLength)
#b58310 - Chunks
#ac69ef - Entities
#7dcc24 - RAM
#e0d264 - CPU
https://fonts.googleapis.com/css?family=Quicksand:300,400 (Font Link)
main.css:
#fff (white)
#000 (black)
#e2e2e2 (Table, even)
#eee (Table, odd)
#348e0f Theme (Header, on hover) Darker
#5da341 Theme (Main color)
'Quicksand', sans-serif (Font Family)

File diff suppressed because it is too large Load Diff

View File

@ -1,108 +1,102 @@
Settings: Server:
ServerName: 'Plan'
Plugin:
Debug: false Debug: false
Locale: default Locale: default
WriteNewLocaleFileOnStart: false WriteNewLocaleFileOnEnable: false
UseTextUI: false Bungee-Override:
Data: StandaloneMode: false
ChatListener: true CopyBungeeConfig: true
GatherKillData: true
GatherCommandUsage: true WebServer:
Analysis: Port: 8804
LogProgressOnConsole: false InternalIP: 0.0.0.0
NotifyWhenFinished: true Security:
MinutesPlayedUntilConsidiredActive: 10 SSL-Certificate:
Export: KeyStorePath: 'SSLCertificate.keystore'
Enabled: false KeyPass: 'default'
DestinationFolder: 'Analysis Results' StorePass: 'default'
Cache: Alias: 'alias'
Processing:
GetLimit: 5000 Database:
SaveLimit: 2500 Type: SQLite
ClearLimit: 2500 MySQL:
AnalysisCache: Host: localhost
RefreshAnalysisCacheOnEnable: true Port: 3306
RefreshEveryXMinutes: -1 User: root
InspectCache: Password: minecraft
ClearFromInspectCacheAfterXMinutes: 5 Database: Plan
DataCache:
SaveEveryXMinutes: 2 Commands:
ClearCacheEveryXSaves: 5 AlternativeIP:
WebServer: Enabled: false
Enabled: true Link: your.domain.here:%port%
Port: 8804 Colors:
InternalIP: 0.0.0.0 Main: '&2'
ShowAlternativeServerIP: false Secondary: '&7'
AlternativeIP: your.ip.here:%port% Highlight: '&f'
Analysis:
AutoRefreshPeriod: 60
Export:
Enabled: false
ExternalWebServerLinkProtocol: http ExternalWebServerLinkProtocol: http
Security: DestinationFolder: 'Analysis Results'
DisplayIPsAndUUIDs: true
Certificate: Data:
KeyStorePath: 'SSLCertificate.keystore' Commands:
KeyPass: 'default' LogUnknownCommands: false
StorePass: 'default' CombineCommandAliases: true
Alias: 'alias'
Customization: Customization:
ServerName: 'Plan' Formatting:
SmallHeadImagesOnAnalysisPlayerlist: true DecimalPoints: '#.##'
Data:
DoNotLogUnknownCommands: false
CombineCommandAliasesToMainCommand: false
Formats:
TimeAmount: TimeAmount:
Year: '1 year, ' Year: '1 year, '
Years: '%years% years, ' Years: '%years% years, '
Month: '1 month, '
Months: '%months% months, '
Day: '1d ' Day: '1d '
Days: '%days%d ' Days: '%days%d '
Hours: '%hours%h ' Hours: '%hours%h '
Minutes: '%minutes%m ' Minutes: '%minutes%m '
Seconds: '%seconds%s' Seconds: '%seconds%s'
DecimalPoints: '#.##'
Theme:
Base: Default
Font:
FontStyleSheet: https://fonts.googleapis.com/css?family=Quicksand:300,400
FontFamily: "'Quicksand', sans-serif"
Color:
Dark: Base
Light: Base
Colors: Colors:
Commands: Main: Base
Main: '&2' Secondary: Base
Secondary: '&7' Secondary-Dark: Base
Highlight: '&f' Tertiary: Base
HTML: Background: Base
UI: Table-Light: Base
Main: 348e0f Table-Dark: Base
MainDark: 267F00 Graphs:
Secondary: 5cb239 PunchCard: Base
Tertiary: 89c471 PlayersOnline: Base
TertiaryDark: 5da341 TPS:
TPSGraph: High-Threshold: 18
TPSHigh: 18 Medium-Threshold: 10
TPSMedium: 10 High: Base
TPSHighCol: 267F00 Medium: Base
TPSMediumCol: e5cc12 Low: Base
TPSLowCol: b74343 CPU: Base
ActivityGraph: RAM: Base
OnlinePlayers: '1E90FF' Chunks: Base
NewPlayers: '228B22' Entities: Base
GamemodePie:
Survival: '438c99'
Creative: '639A67'
Adventure: 'D8EBB5'
Spectator: 'D9BF77'
ActivityPie:
Active: '228B22'
Banned: '951800'
Inactive: 'A9A9A9'
JoinedOnce: '808080'
Plugins:
Factions:
HideFactions:
- ExampleFaction
Towny:
HideTowns:
- ExampleTown
database: Plugins:
type: sqlite Factions:
HideFactions:
mysql: - ExampleFaction
host: localhost Towny:
port: 3306 HideTowns:
user: root - ExampleTown
password: minecraft
database: Plan

View File

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html>
<head>
<title>Plan | Network</title>
<meta name="description" content="Player Analysis window">
<meta name="author" content="Rsl1122">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://puu.sh/tK0KL/6aa2ba141b.ico" type="image/x-icon">
<link rel="stylesheet" href="./main.css">
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400" rel="stylesheet">
<script src="https://use.fontawesome.com/df48eb908b.js"></script>
</head>
<body>
<header>
<div>
<img class="right" src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p class="right">Player Analytics v.4.0.0</p>
<h1>Plan | Network</h1>
</div>
</header>
<div class="content">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2>
</div>
<div class="box-footer">
<img style="width: 100%;" src="http://puu.sh/xdcdv/77aca85f4c.png">
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2>
</div>
<div class="box" style="height: 75%;">
<p>53/175 Players Online</p>
<p>497 Active Players<br>1246 Total Players</p>
<p>43 New Players Today<br>124 New Players This Week</p>
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Server 1</h2>
</div>
<div class="box">
<p>30/50 Players Online</p>
<p>100 Active Players</p>
</div>
<div class="box-footer">
<p>Last Refresh: 13:08</p>
<a href="#" class="button right">Analysis</a>
<a href="#" class="refresh button right" style="color: #000; background-color: #fff;"><i
class="fa fa-refresh" aria-hidden="true"></i></a>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Server 2</h2>
</div>
<div class="box">
<p>0/25 Players Online</p>
<p>3 Active Players</p>
</div>
<div class="box-footer">
<p>Last Refresh: Never</p>
<a class="button disabled right">Analysis</a>
<a href="#" class="refresh button right" style="color: #000; background-color: #fff;"><i
class="fa fa-refresh" aria-hidden="true"></i></a>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Server 3</h2>
</div>
<div class="box">
<p>23/100 Players Online</p>
<p>432 Active Players</p>
</div>
<div class="box-footer">
<p>Last Refresh: Analyzing..</p>
<a class="button disabled right">Analysis</a>
<a href="#" class="refresh button right" style="color: #000; background-color: #fff;"><i
class="fa fa-refresh fa-spin" aria-hidden="true"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Server 4</h2>
</div>
<div class="box">
<p>Offline</p>
<p>&nbsp;</p>
</div>
<div class="box-footer">
<p>Last Refresh: Never</p>
<a class="button disabled right">Analysis</a>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Hub</h2>
</div>
<div class="box" style="height: 75%;">
<p>0/175 Players Online</p>
<p>&nbsp;</p>
</div>
</div>
<div class="column"></div>
</div>
</div>
<script src="./js/playerGraph.js"></script>
<script>
var playersOnlineSeries = {
name: 'Players Online',
data: %playersonlineseries%,
type: 'areaspline',
color: '#%playersgraphcolor%',
tooltip: {
valueDecimals: 0
}
};
/*playersChart('playerChart', playersOnlineSeries, 3);*/
</script>
</body>
</html>

View File

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>Plan | Network</title>
<meta name="description" content="Player Analysis window">
<meta name="author" content="Rsl1122">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://puu.sh/tK0KL/6aa2ba141b.ico" type="image/x-icon">
<link rel="stylesheet" href="./main.css">
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400" rel="stylesheet">
<script src="https://use.fontawesome.com/df48eb908b.js"></script>
</head>
<body>
<header>
<div>
<img class="right" src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p class="right">Player Analytics v.${version}</p>
<h1>${networkName} | Network</h1>
</div>
</header>
<div class="content">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2>
</div>
<div class="box-footer">
<div id="playersOnline" style="width: 100%; height: 500px;"></div>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2>
</div>
<div class="box" style="height: 75%;">
<p>${playersOnline}/${playersMax} Players Online</p>
<p>${playersActive} Active Players<br>${playersTotal} Total Players</p>
<p>${playersNewDay} New Players Today<br>${playersNewWeek} New Players This Week</p>
</div>
</div>
</div>
${contentServers}
</div>
<script src="./js/playerGraph.js"></script>
<script>
var playersOnlineSeries = {
name: 'Players Online',
data: %playersonlineseries%,
type: 'areaspline',
color: '#%playersgraphcolor%',
tooltip: {
valueDecimals: 0
}
};
/*playersChart('playerChart', playersOnlineSeries, 3);*/
</script>
</body>
</html>

View File

@ -0,0 +1,446 @@
<!DOCTYPE html>
<html>
<head>
<title>Plan | Rsl1122</title>
<meta name="description" content="Player Analysis window">
<meta name="author" content="Rsl1122">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://puu.sh/tK0KL/6aa2ba141b.ico" type="image/x-icon">
<link rel="stylesheet" href="./main.css">
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400" rel="stylesheet">
<script src="https://use.fontawesome.com/df48eb908b.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<header>
<div>
<img class="right" src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p class="right">Player Analytics v.4.0.0</p>
<h1>Plan | Rsl1122</h1>
</div>
</header>
<div class="content-server">
<div class="nav-bar row">
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-info-circle" aria-hidden="true"></i> Information
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-calendar" aria-hidden="true"></i> Sessions
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-line-chart" aria-hidden="true"></i> Overview
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cubes" aria-hidden="true"></i> Plugins
</a>
</div>
<div id="limiter" class="main-limiter">
<div id="main" class="main-wrapper">
<div id="tab-information" class="tab">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<div class="row">
<div class="column">
<p>Active &#x2022; <span class="darkred">Offline</span> &#x2022; Operator<br>
<br>
Also Known As:<br>
&#x2022; <span class="darkred">Rsl</span><br>
&#x2022; Rsl1122<br>
<br>
Has Logged in From:<br>
&#x2022; Finland</p>
</div>
<div class="column">
<p>Registered: May 01 2016, 13:39<br>
Last Seen: Aug 18 2017, 20:00<br>
<br>
Sessions: 76<br>
Total Playtime: 4d 4h 40m<br>
Session Median: 7m<br>
<br>
Longest Session: 2h 37m
</p>
</div>
</div>
</div>
<div class="box-header">
<h2><i class="fa fa-drivers-license" aria-hidden="true"></i> Rsl1122</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<div class="row">
<div class="column" style="padding: 5px 0px 5px 10px;"><p>Times Kicked: 0<br></p></div>
<div class="column"><img style="padding: 10px 100px; height: 100px; width: 100px;"
src="https://cravatar.eu/avatar/Rsl1122/100"></div>
<div class="column"><p>Player Kills: 49<br>
Mob Kills: 548<br>
Deaths: 12
</p>
</div>
</div>
<table class="sortable table">
<thead>
<tr>
<th>Time</th>
<th>Action</th>
<th>Info</th>
</tr>
</thead>
<tbody>
<tr>
<th>Aug 16 2017, 17:20</th>
<th>Killed</th>
<th>HannesDaDon with Iron Sword</th>
</tr>
<tr>
<th>Aug 16 2017, 17:19</th>
<th>Killed</th>
<th>Einsamer_Keksi with Iron Sword</th>
</tr>
<tr>
<th>Aug 16 2017, 15:19</th>
<th>Changed name</th>
<th>Rsl1122 <i class="fa fa-long-arrow-right" aria-hidden="true"></i> <span
class="darkred">Rsl</span></th>
</tr>
<tr>
<th>May 01 2016, 14:24</th>
<th>First Logout</th>
<th>Messages sent: 74</th>
</tr>
<tr>
<th>May 01 2016, 13:39</th>
<th>Registered</th>
<th>Online: 34 Players</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-braille" aria-hidden="true"></i> Join PunchCard</h2>
</div>
<div class="box-footer">
<img id="playersOnlineDay" src="http://puu.sh/xdhil/73c2c5b944.png"
style="width: 100%; /height: 700px;"><!--</div>-->
</div>
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> Server Preference</h2>
</div>
<div class="box-footer">
<img id="playersOnlineDay" src="http://puu.sh/xdgXa/f4a3b7df80.png"
style="width: 100%; /height: 700px;"><!--</div>-->
</div>
</div>
</div>
</div>
<div id="tab-sessions" class="tab">
<div class="row" style="flex-grow: 2; width: 140%;">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-calendar" aria-hidden="true"></i> 50 Most Recent Sessions</h2>
</div>
<div class="session column">
<div class="session-header">
<div class="session-col" style="width: 200%;"><h3>Aug 14 2017, 12:12 &#x2022; 1h</h3>
<p>Click to Expand</p></div>
</div>
<div class="session-content">
<div class="row">
<div class="session-col" style="padding: 0px;">
<div class="box-header" style="margin: 0px;">
<h2><i class="fa fa-calendar" aria-hidden="true"></i> Aug 13 2017, 13:23
</h2>
</div>
<div class="box" style="margin: 0px;">
<p>Session Length: 3h 5m<br>
Session Ended: Aug 14 2017, 13:12<br>
Server: Server 2<br>
<br>
Mob Kills: 0<br>
Deaths: 1</p>
<table class="sortable table">
<thead>
<tr>
<th><i class="fa fa-clock-o" aria-hidden="true"> Time</th>
<th>Killed</th>
<th>With</th>
</tr>
</thead>
<tbody>
<tr>
<th>12:42</th>
<th>Zubat</th>
<th>Lightning</th>
</tr>
<tr>
<th>12:53</th>
<th>Zezima</th>
<th>Iron Sword</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="session-col">
<img id="worldPie" style="width: 100%;"
src="http://puu.sh/xdhF0/3c7ae10d4e.png">
</div>
</div>
</div>
</div>
<div class="session column">
<div class="session-header">
<div class="session-col" style="width: 200%;"><h3>Aug 13 2017, 15:23 &#x2022; 3h 5m</h3>
<p>Click to Expand</p></div>
</div>
<div class="session-content">
<div class="row">
<div class="session-col" style="padding: 0px;">
<div class="box-header" style="margin: 0px;">
<h2><i class="fa fa-calendar" aria-hidden="true"></i> Aug 13 2017, 13:23
</h2>
</div>
<div class="box" style="margin: 0px;">
<p>Session Length: 3h 5m<br>
Session Ended: Aug 13 2017, 16:28<br>
Server: Server 1<br>
<br>
Mob Kills: 45<br>
Deaths: 6</p>
<table class="sortable table">
<thead>
<tr>
<th><i class="fa fa-clock-o" aria-hidden="true"> Time</th>
<th>Killed</th>
<th>With</th>
</tr>
</thead>
<tbody>
<tr>
<th>13:42</th>
<th>Zubat</th>
<th>Lightning</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="session-col">
<img id="worldPie" style="width: 100%;"
src="http://puu.sh/xdhF0/3c7ae10d4e.png">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="tab-performance" class="tab">
<div class="row">
<div class="column"> <!--First row (horizontal)-->
<div class="column">
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> World Playtime</h2>
</div>
<div class="box-footer">
<img id="worldPie" style="width: 100%;" src="http://puu.sh/xdhF0/3c7ae10d4e.png">
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2>Last 24 Hours</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<p>Sessions: 4<br>
Playtime: 4h 20m<br>
<br>
Longest Session: 1h 43m
</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2>Last 7 Days</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<p>Sessions: 63<br>
Playtime: 1d 3h 32m<br>
<br>
Longest Session: 1h 43m
</p>
</div>
</div>
</div>
</div> <!--First row (horizontal)-->
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Server 1</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<p>Sessions: 24<br>
Playtime: 3d 2h 2m<br>
<br>
Longest Session: 2h 43m
</p>
</div>
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Server 2</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<p>Sessions: 52<br>
Playtime: 6d 10h 2m<br>
<br>
Longest Session: 3h 7m
</p>
</div>
</div>
</div>
</div>
</div>
<div id="tab-plugins" class="tab column">
<div class="plugins-server">
<div class="plugins-header">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-server" aria-hidden="true"></i> Server 2</h2>
<p>Click to Expand</p>
</div>
</div>
</div>
</div>
<div class="plugins-content">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 1</h2>
</div>
<div class="box plugin">
<p>Test: 5 / 25<br>
Test: 20%</p>
<p>More data: Yes<br>
Data: 4</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 2</h2>
</div>
<div class="box plugin">
<p>Yes<br>
Yes<br>
Yes<br>Yes<br>Yes<br>Yes<br>Yes<br>
Yes<br>Yes<br>Yes<br>Yes<br>Yes<br>
Yes<br>Yes<br>Yes<br>Yes<br>Yes<br>
</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 3</h2>
</div>
<div class="box plugin">
<img id="worldPie" style="width: 100%;" src="http://puu.sh/xdhF0/3c7ae10d4e.png">
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header" style="margin-top: 10px;">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 4</h2>
</div>
<div class="box plugin" style="height: 100%;">
<table class="sortable table">
<thead>
<tr>
<th>Test</th>
<th>Test2</th>
</tr>
</thead>
<tbody>
<tr>
<th>Data</th>
<th>Data</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="column"></div>
<div class="column"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/maps/modules/map.js"></script>
<script src="https://code.highcharts.com/mapdata/custom/world.js"></script>
<script src="./js/activityPie.js"></script>
<script src="./js/gmPie.js"></script>
<script src="./js/playerGraph.js"></script>
<script src="./js/punchCard.js"></script>
<script src="./js/resourceGraph.js"></script>
<script src="./js/sessionDistributionChart.js"></script>
<script src="./js/tpsGraph.js"></script>
<script src="./js/worldGraph.js"></script>
<script src="./js/worldMap.js"></script>
<script src="./js/worldPie.js"></script>
<script src="./js/pluginsTabExpand.js"></script>
<script src="./js/sessionTabExpand.js"></script>
<script>
var navButtons = document.getElementsByClassName("nav-button");
var tabs = document.getElementsByClassName("tab");
var slideIndex = window.sessionStorage.getItem("InspectSlideIndex");
if (slideIndex === null) {
slideIndex = 0;
}
var x = document.getElementById("main");
x.style.transform = "translate3d(0px,0px,0)";
x.style.width = "" + navButtons.length * 100 + "%";
for (var i = 0; i < navButtons.length; i++) {
navButtons[i].onclick = openFunc(i)
tabs[i].style.width = "" + 100 / navButtons.length + "%";
}
x.style.opacity = "1";
openFunc(slideIndex)();
function openFunc(i) {
return function() {
var max = navButtons.length;
for (var j = 0; j < max; j++) {
if (j === i) {
navButtons[j].classList.add('active');
continue;
}
if (navButtons[j].classList.contains('active')) {
navButtons[j].classList.remove('active');
}
}
var perc = - 100 / navButtons.length;
slideIndex = i;
if (slideIndex > max) {slideIndex = 0};
if (slideIndex < 0) {slideIndex = max};
window.sessionStorage.setItem("InspectSlideIndex", slideIndex);
var value = slideIndex * perc;
x.style.transition = "0.5s";
x.style.transform = "translate3d(" + value + "%,0px,0)";
};
}
</script>
</div>
</body>
</html>

View File

@ -0,0 +1,227 @@
<!DOCTYPE html>
<html>
<head>
<title>Plan | ${playerName}</title>
<meta name="description" content="Player Analysis window">
<meta name="author" content="Rsl1122">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://puu.sh/tK0KL/6aa2ba141b.ico" type="image/x-icon">
<link rel="stylesheet" href="./main.css">
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400" rel="stylesheet">
<script src="https://use.fontawesome.com/df48eb908b.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<header>
<div>
<img class="right" src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p class="right">Player Analytics v.${version}</p>
<h1>${serverName} | ${playerName}</h1>
</div>
</header>
<div class="content-server">
<div class="nav-bar row">
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-info-circle" aria-hidden="true"></i> Information
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-calendar" aria-hidden="true"></i> Sessions
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-line-chart" aria-hidden="true"></i> Overview
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cubes" aria-hidden="true"></i> Plugins
</a>
</div>
<div id="limiter" class="main-limiter">
<div id="main" class="main-wrapper">
<div id="tab-information" class="tab">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<div class="row">
<div class="column">
<p>${playerClassification}<br>
<br>
Also Known As:<br>
${nicknames}
<br>
Has Logged in From:<br>
${geolocations}</p>
</div>
<div class="column">
<p>Registered: ${registered}<br>
Last Seen: ${lastSeen}<br>
<br>
Sessions: ${sessionCount}<br>
Total Playtime: ${playtimeTotal}<br>
Session Median: ${sessionLengthMedian}<br>
<br>
Longest Session: ${sessionLengthLongest}
</p>
</div>
</div>
</div>
<div class="box-header">
<h2><i class="fa fa-drivers-license" aria-hidden="true"></i> ${playerName}</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<div class="row">
<div class="column" style="padding: 5px 0px 5px 10px;"><p>Times Kicked: ${kickCount}<br>
</p></div>
<div class="column"><img style="padding: 10px 100px; height: 100px; width: 100px;"
src="https://cravatar.eu/avatar/${playerName}/100"></div>
<div class="column"><p>Player Kills: ${playerKillCount}<br>
Mob Kills: ${mobKillCount}<br>
Deaths: ${deathCount}
</p>
</div>
</div>
<table class="sortable table">
<thead>
<tr>
<th>Time</th>
<th>Action</th>
<th>Info</th>
</tr>
</thead>
<tbody>
${tableBodyActions}
</tbody>
</table>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-braille" aria-hidden="true"></i> Join PunchCard</h2>
</div>
<div class="box-footer">
<div id="punchcard" style="width: 100%; height: 400px;"></div>
</div>
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> Server Preference</h2>
</div>
<div class="box-footer">
<div id="serverPie" style="width: 100%; height: 400px;"></div>
</div>
</div>
</div>
</div>
<div id="tab-sessions" class="tab">
<div class="row" style="flex-grow: 2; width: 140%;">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-calendar" aria-hidden="true"></i> 50 Most Recent Sessions</h2>
</div>
${contentSessions}
</div>
</div>
</div>
<div id="tab-performance" class="tab">
<div class="row">
<div class="column"> <!--First row (horizontal)-->
<div class="column">
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> World Playtime</h2>
</div>
<div class="box-footer">
<div id="worldPie" style="width: 100%; height: 400px;"></div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2>Last 24 Hours</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<p>Sessions: ${sessionCountDay}<br>
Playtime: ${playtimeDay}<br>
<br>
Longest Session: ${sessionLengthLongestDay}
</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2>Last 7 Days</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<p>Sessions: ${sessionCountWeek}<br>
Playtime: ${playtimeWeek}<br>
<br>
Longest Session: ${sessionLengthLongestWeek}
</p>
</div>
</div>
</div>
</div> <!--First row (horizontal)-->
<div class="row">
${contentServerOverview}
</div>
</div>
</div>
<div id="tab-plugins" class="tab column">
${tabContentPlugins}
</div>
</div>
</div>
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/maps/modules/map.js"></script>
<script src="https://code.highcharts.com/mapdata/custom/world.js"></script>
<script src="./js/punchCard.js"></script>
<script src="./js/serverPie.js"></script>
<script src="./js/worldPie.js"></script>
<script src="./js/pluginsTabExpand.js"></script>
<script src="./js/sessionTabExpand.js"></script>
<script>
var navButtons = document.getElementsByClassName("nav-button");
var tabs = document.getElementsByClassName("tab");
var slideIndex = window.sessionStorage.getItem("InspectSlideIndex");
if (slideIndex === null) {
slideIndex = 0;
}
var x = document.getElementById("main");
x.style.transform = "translate3d(0px,0px,0)";
x.style.width = "" + navButtons.length * 100 + "%";
for (var i = 0; i < navButtons.length; i++) {
navButtons[i].onclick = openFunc(i)
tabs[i].style.width = "" + 100 / navButtons.length + "%";
}
x.style.opacity = "1";
openFunc(slideIndex)();
function openFunc(i) {
return function() {
var max = navButtons.length;
for (var j = 0; j < max; j++) {
if (j === i) {
navButtons[j].classList.add('active');
continue;
}
if (navButtons[j].classList.contains('active')) {
navButtons[j].classList.remove('active');
}
}
var perc = - 100 / navButtons.length;
slideIndex = i;
if (slideIndex > max) {slideIndex = 0};
if (slideIndex < 0) {slideIndex = max};
window.sessionStorage.setItem("InspectSlideIndex", slideIndex);
var value = slideIndex * perc;
x.style.transition = "0.5s";
x.style.transform = "translate3d(" + value + "%,0px,0)";
};
}
</script>
</div>
</body>
</html>

View File

@ -0,0 +1,639 @@
<!DOCTYPE html>
<html>
<head>
<title>Plan | Server</title>
<meta name="description" content="Player Analysis window">
<meta name="author" content="Rsl1122">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://puu.sh/tK0KL/6aa2ba141b.ico" type="image/x-icon">
<link rel="stylesheet" href="./main.css">
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400" rel="stylesheet">
<script src="https://use.fontawesome.com/df48eb908b.js"></script>
</head>
<body>
<header>
<div>
<img class="right" src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p class="right">Player Analytics v.4.0.0</p>
<h1>Plan | Server Analysis</h1>
</div>
</header>
<div class="content-server">
<div class="row nav-bar">
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-info-circle" aria-hidden="true"></i> Information
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-bar-chart" aria-hidden="true"></i> Online Activity
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-calendar" aria-hidden="true"></i> Sessions
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cogs" aria-hidden="true"></i> Performance
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-list-alt" aria-hidden="true"></i> Playerlist
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-terminal" aria-hidden="true"></i> Command usage
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-globe" aria-hidden="true"></i> Demographics
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cubes" aria-hidden="true"></i> Plugins
</a>
</div>
<div id="limiter" class="main-limiter">
<div id="main" class="main-wrapper row">
<div id="tab-information" class="tab">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2>
</div>
<div class="box-footer">
<img id="playersOnline" style="width: 100%;" src="http://puu.sh/xdcdv/77aca85f4c.png">
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<div class="row">
<div class="column">
<p>30/50 Players Online<br>43 New Players Today<br>
<br>
100 Active Players<br>
1246 Total Players<br>
<br>
Peak Time: 18:23 Pm<br>
Last Peak: 53 Players<br>
<br>
<b>All Time Peak:</b><br>
Aug 13 2017, 18:46: 75 Players
</p>
</div>
<div class="column">
<p><b>Averages:</b></p>
<li>Session Length: 28m 42s</li>
<li>Players / Day: 196</li>
<li>New Players / Day: 24</li>
<p><b>Total:</b></p>
<li>Playtime: 3 months 5d 53h</li>
<li>Sessions: 6480</li>
<li>Kills: 3403</li>
<li>Mob Kills: 503402</li>
<li>Deaths: 5704</li>
</div>
</div>
</div>
<div class="box-header">
<h2><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Recent Logins</h2>
</div>
<div class="box-footer" style="padding: 2px;">
<table>
<thead>
<tr>
<th>Player</th>
<th>Seen</th>
</tr>
</thead>
<tbody>
<tr>
<th><a class="link" href="#">Rsl1122</a></th>
<th>18 Aug 2017, 15:56</th>
</tr>
<tr>
<th><a class="link" href="#">Melonking</a></th>
<th>18 Aug 2017, 15:43</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="tab-online-activity" class="tab column">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2>
</div>
<div class="box-footer">
<img id="playersOnline2" style="width: 100%;" src="http://puu.sh/xdcdv/77aca85f4c.png">
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-braille" aria-hidden="true"></i> Player Join PunchCard</h2>
</div>
<div class="box-footer">
<img id="punchCard" style="width: 100%;" src="http://puu.sh/xdhil/73c2c5b944.png">
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2>Last 24 Hours</h2>
</div>
<div class="box">
<p>Unique Players: 217<br>
Unique / Day: 217</p>
<p>New Players: 38<br>
New / Day: 38</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2>Last 7 Days</h2>
</div>
<div class="box">
<p>Unique Players: 670<br>
Unique / Day: 204</p>
<p>New Players: 247<br>
New / Day: 35</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2>Last 30 Days</h2>
</div>
<div class="box">
<p>Unique Players: 812<br>
Unique / Day: 196</p>
<p>New Players: 463<br>
New / Day: 15</p>
</div>
</div>
</div>
</div>
<div id="tab-sessions" class="tab">
<div class="row" style="flex-grow: 2; width: 140%;">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-calendar" aria-hidden="true"></i> 50 Most Recent Sessions</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table">
<thead>
<tr>
<th>Player</th>
<th>Started</th>
<th>Length</th>
<th>World - Time</th>
</tr>
</thead>
<tbody>
<tr>
<th><a class="link" href="#">Rsl1122</a></th>
<th>18 Aug, 16:22</th>
<th>Online</th>
<th>freebuildnew - 100%</th>
</tr>
<tr>
<th><a class="link" href="#">Rsl1122</a></th>
<th>18 Aug, 15:56</th>
<th>1h 45m 43s</th>
<th>world - 87%</th>
</tr>
<tr>
<th><a class="link" href="#">Melonking</a></th>
<th>18 Aug, 15:43</th>
<th>5m 2s</th>
<th>gm3 - 62%</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> World Playtime</h2>
</div>
<div class="box-footer">
<img id="worldPie" style="width: 100%;" src="http://puu.sh/xdhF0/3c7ae10d4e.png">
</div>
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> Playerbase</h2>
</div>
<div class="box-footer">
<img id="activityPie" style="width: 100%;" src="http://puu.sh/xdgXa/f4a3b7df80.png">
</div>
</div>
</div>
</div>
<div id="tab-performance" class="tab">
<div class="column">
<div class="row"> <!--First row (horizontal)-->
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Ticks Per Second</h2>
</div>
<div class="box-footer">
<img id="tpsGraph" style="width: 100%;" src="http://puu.sh/xdivg/0dfd27035a.png">
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Resource Usage</h2>
</div>
<div class="box-footer">
<img id="resourceGraph" style="width: 100%;" src="http://puu.sh/xdjtY/419496ddf3.png">
</div>
</div>
</div> <!--First row (horizontal)-->
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> World Load</h2>
</div>
<div class="box-footer">
<img id="worldGraph" style="width: 100%;" src="http://puu.sh/xdjut/bcc8d4d7ff.png">
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cogs" aria-hidden="true"></i> Last 24 Hours</h2>
</div>
<div class="box">
<p><b>Averages:</b></p>
<ul>
<li>TPS: 19.83</li>
<li>CPU: 25.51%</li>
<li>RAM: 5282 Mb</li>
<li>Entities: 3649</li>
<li>Chunks: 1789</li>
</ul>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cogs" aria-hidden="true"></i> Last 7 Days</h2>
</div>
<div class="box">
<p><b>Averages:</b></p>
<ul>
<li>TPS: 19.83</li>
<li>CPU: 25.51%</li>
<li>RAM: 5282 Mb</li>
<li>Entities: 3649</li>
<li>Chunks: 1789</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="tab-playerlist" class="tab">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-list" aria-hidden="true"></i> Playerlist</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table">
<thead>
<tr>
<th><i class="fa fa-user" aria-hidden="true"></i> Player</th>
<th><i class="fa fa-check" aria-hidden="true"></i> Active</th>
<th><i class="fa fa-clock-o" aria-hidden="true"></i> Playtime</th>
<th><i class="fa fa-calendar-plus-o" aria-hidden="true"></i> Login times</th>
<th><i class="fa fa-user-plus" aria-hidden="true"></i> Registered</th>
<th><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Last seen</th>
<th><i class="fa fa-globe" aria-hidden="true"></i> Geolocation</th>
</tr>
</thead>
<tbody>
<tr>
<th><a class="link" href="#">Rsl1122</a></th>
<th>Active</th>
<th>1d 20h 4m 2s</th>
<th>324</th>
<th>Aug 18 2017, 15:54</th>
<th>Aug 18, 16:48</th>
<th>Finland</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="tab-command-usage" class="tab">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-list" aria-hidden="true"></i> Playerlist</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table">
<thead>
<tr>
<th><i class="fa fa-chevron-right" aria-hidden="true"></i> Command</th>
<th><i class="fa fa-list-ol" aria-hidden="true"></i> Times used</th>
</tr>
</thead>
<tbody>
<tr>
<th>/plan</th>
<th>432</th>
</tr>
<tr>
<th>/spawn</th>
<th>23</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="tab-demographics" class="tab">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-globe" aria-hidden="true"></i> Geolocations</h2>
</div>
<div class="box-footer" style="padding: 2px;">
<img id="geoChart" style="width: 100%;" src="http://puu.sh/xdVkp/9eddada8bd.png">
</div>
</div>
</div>
<div id="tab-plugins" class="tab column">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 1</h2>
</div>
<div class="box plugin">
<p>Test: 5 / 25<br>
Test: 20%</p>
<p>More data: Yes<br>
Data: 4</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 2</h2>
</div>
<div class="box plugin">
<p>Yes<br>
Yes<br>
Yes<br>Yes<br>Yes<br>Yes<br>Yes<br>
Yes<br>Yes<br>Yes<br>Yes<br>Yes<br>
Yes<br>Yes<br>Yes<br>Yes<br>Yes<br>
</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 3</h2>
</div>
<div class="box plugin">
<img id="pluginpie" style="width: 100%;" src="http://puu.sh/xdhF0/3c7ae10d4e.png">
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header" style="margin-top: 10px;">
<h2><i class="fa fa-cube" aria-hidden="true"></i> Plugin 4</h2>
</div>
<div class="box plugin" style="height: 100%;">
<table class="sortable table">
<thead>
<tr>
<th>Test</th>
<th>Test2</th>
</tr>
</thead>
<tbody>
<tr>
<th>Data</th>
<th>Data</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="column" style="width: 200%;">
<div class="box-header" style="margin-top: 10px;">
<h2>That's all..</h2>
</div>
<div class="box plugin">
<p>Do you have more plugins? ._.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/maps/modules/map.js"></script>
<script src="https://code.highcharts.com/mapdata/custom/world.js"></script>
<script src="./js/activityPie.js"></script>
<script src="./js/gmPie.js"></script>
<script src="./js/playerGraph.js"></script>
<script src="./js/punchCard.js"></script>
<script src="./js/resourceGraph.js"></script>
<script src="./js/sessionDistributionChart.js"></script>
<script src="./js/tpsGraph.js"></script>
<script src="./js/worldGraph.js"></script>
<script src="./js/worldMap.js"></script>
<script src="./js/worldPie.js"></script>
<script>
Highcharts.setOptions({
global: {
timezoneOffset: ${timeZone} * 60
}
});
// Data Variables
var playersOnlineSeries = {
name: 'Players Online',
data: ${playersOnlineSeries},
type: 'areaspline',
color: '#%playersgraphcolor%',
tooltip: {
valueDecimals: 0
}
};
var tpsSeries = {
name: 'TPS',
data: ${tpsSeries},
type: 'spline',
zones: [{
value: %tpsmedium%,
color: '${tpsLowColor}'
}, {
value: %tpshigh%,
color: '${tpsMediumColor}'
}, {
value: 30,
color: '${tpsHighColor}'
}],
tooltip: {
valueDecimals: 2
},
yAxis: 1
};
var cpuSeries = {
name: 'CPU Usage',
data: ${cpuSeries},
type: 'areaspline',
color: '#e0d264',
tooltip: {
pointFormat: '{series.name}: <b>{point.y:.2f}%</b>'
}
};
var ramSeries = {
name: 'RAM Usage',
data: ${ramSeries},
type: 'areaspline',
color: '#7dcc24',
tooltip: {
valueDecimals: 0
},
yAxis: 1
};
var entitySeries = {
name: 'Loaded Entities',
data: ${entitySeries},
type: 'areaspline',
color: '#ac69ef',
tooltip: {
valueDecimals: 0
},
yAxis: 1
};
var chunkSeries = {
name: 'Loaded Chunks',
data: ${chunkSeries},
type: 'areaspline',
color: '#b58310',
tooltip: {
valueDecimals: 0
}
};
var activitySeries = {
name: 'Players',
colorByPoint: true,
data: [{
name: 'Active',
y: ${active}
}, {
name: 'Inactive',
y: ${inactive},
sliced: true,
selected: true
}, {
name: 'Single Join',
y: ${joinLeaver}
}, {
name: 'Banned',
y: ${banned}
}]
};
var gmData = ${gmData};
var gmSeries = {
name: 'GM Usage',
colorByPoint: true,
data: [{
name: 'Survival',
y: gmData[0],
sliced: true,
selected: true
}, {
name: 'Creative',
y: gmData[1]
}, {
name: 'Adventure',
y: gmData[2]
}, {
name: 'Spectator',
y: gmData[3]
}]
};
var worldSeries = {
name: 'World Playtime',
colorByPoint: true,
data: ${worldSeries}
};
var mapSeries = {
name: 'Players',
type: 'map',
mapData: Highcharts.maps['custom/world'],
data: ${geoMapSeries}
joinBy: ['iso-a3', 'code']
};
var sessionLengthSeries = {
name: 'Sessions',
color: '#89c471',
data: ${sessionLengthSeries}
};
var punchcardSeries = {
name: 'Relative Activity',
color: '#222',
data: ${punchCardSeries}
};
</script>
<script>
var navButtons = document.getElementsByClassName("nav-button");
var tabs = document.getElementsByClassName("tab");
var slideIndex = window.sessionStorage.getItem("AnalysisSlideIndex");
if (slideIndex === null) {
slideIndex = 0;
}
var x = document.getElementById("main");
x.style.transform = "translate3d(0px,0px,0)";
x.style.width = "" + navButtons.length * 100 + "%";
for (var i = 0; i < navButtons.length; i++) {
navButtons[i].onclick = openFunc(i)
tabs[i].style.width = "" + 100 / navButtons.length + "%";
}
x.style.opacity = "1";
openFunc(slideIndex)();
/*gmPie('gmPie', gmSeries, '%gmtotal%', [%gmcolors%]);
activityPie('activityPie', activitySeries, %activitytotal%, [%activitycolors%]);
worldPie('worldPie', worldSeries, '%worldtotal%');
playersChart('playerChartDay', playersOnlineSeries, 1);
playersChart('playerChartMonth', playersOnlineSeries, 4);
tpsChart('tpsGraph', tpsSeries, playersOnlineSeries);
resourceChart('resourceGraph', cpuSeries, ramSeries);
worldChart('worldGraph', entitySeries, chunkSeries);
worldMap('choropleth', '#EEFFEE', '#267f00', mapSeries);
sessionDistributionChart('sessionDistribution', sessionLengthSeries);
punchCard('punchcard', punchcardSeries);
countUpTimer();*/
function openFunc(i) {
return function() {
var max = navButtons.length;
for (var j = 0; j < max; j++) {
if (j === i) {
navButtons[j].classList.add('active');
continue;
}
if (navButtons[j].classList.contains('active')) {
navButtons[j].classList.remove('active');
}
}
var perc = - 100 / navButtons.length;
slideIndex = i;
if (slideIndex > max) {slideIndex = 0};
if (slideIndex < 0) {slideIndex = max};
window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex);
var value = slideIndex * perc;
x.style.transition = "0.5s";
x.style.transform = "translate3d(" + value + "%,0px,0)";
};
}
</script>
</div>
</body>
</html>

View File

@ -0,0 +1,536 @@
<!DOCTYPE html>
<html>
<head>
<title>Plan | Server</title>
<meta name="description" content="Player Analysis window">
<meta name="author" content="Rsl1122">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://puu.sh/tK0KL/6aa2ba141b.ico" type="image/x-icon">
<link rel="stylesheet" href="./main.css">
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400" rel="stylesheet">
<script src="https://use.fontawesome.com/df48eb908b.js"></script>
</head>
<body>
<header>
<div>
<img class="right" src="https://puu.sh/tJZUb/c2e0ab220f.png" alt="Player Analytics | Analysis">
<p class="right">Player Analytics v.${version}</p>
<h1>${serverName} | Server Analysis</h1>
</div>
</header>
<div class="content-server">
<div class="nav-bar row">
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-info-circle" aria-hidden="true"></i> Information
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-bar-chart" aria-hidden="true"></i> Online Activity
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-calendar" aria-hidden="true"></i> Sessions
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cogs" aria-hidden="true"></i> Performance
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-list-alt" aria-hidden="true"></i> Playerlist
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-terminal" aria-hidden="true"></i> Command usage
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-globe" aria-hidden="true"></i> Demographics
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cubes" aria-hidden="true"></i> Plugins
</a>
</div>
<div id="limiter" class="main-limiter">
<div id="main" class="main-wrapper">
<div id="tab-information" class="tab">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2>
</div>
<div class="box-footer">
<div id="playersOnlineDay" style="width: 100%; height: 700px;"></div>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2>
</div>
<div class="box" style="margin-bottom: 5px;">
<div class="row">
<div class="column">
<p>${playersOnline}/${playersMax} Players Online<br>43 New Players Today<br>
<br>
${playersActive} Active Players<br>
${playersTotal} Total Players<br>
<br>
Peak Time: ${lastPeakTime}<br>
Last Peak: ${playersLastPeak} Players<br>
<br>
<b>All Time Peak:</b><br>
${bestPeakTime}: ${playersBestPeak} Players
</p>
</div>
<div class="column">
<p><b>Averages:</b></p>
<li>Session Length: ${sessionAverage}</li>
<li>Players / Day: ${playersAverage}</li>
<li>New Players / Day: ${playersNewAverage}</li>
<p><b>Total:</b></p>
<li>Playtime: ${playtimeTotal}</li>
<li>Sessions: ${sessionCount}</li>
<li>Kills: ${killCount}</li>
<li>Mob Kills: ${mobKillCount}</li>
<li>Deaths: ${deathCount}</li>
</div>
</div>
</div>
<div class="box-header">
<h2><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Recent Logins</h2>
</div>
<div class="box-footer" style="padding: 2px;">
<table>
<thead>
<tr>
<th>Player</th>
<th>Seen</th>
</tr>
</thead>
<tbody>
${tableBodyRecentLogins}
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="tab-online-activity" class="tab column">
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2>
</div>
<div class="box-footer">
<div id="playersOnlineMonth" style="width: 100%; height: 700px;"></div>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-braille" aria-hidden="true"></i> Player Join PunchCard</h2>
</div>
<div class="box-footer">
<div id="punchcard" style="width: 100%; height: 700px;"></div>
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2>Last 24 Hours</h2>
</div>
<div class="box">
<p>Unique Players: ${playersDay}<br>
Unique / Day: ${playersAverageDay}</p>
<p>New Players: ${playersNewDay} <br>
New / Day: ${playersNewAverageDay}</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2>Last 7 Days</h2>
</div>
<div class="box">
<p>Unique Players: ${playersWeek}<br>
Unique / Day: ${playersAverageWeek}</p>
<p>New Players: ${playersNewWeek}<br>
New / Day: ${playersNewAverageWeek}</p>
</div>
</div>
<div class="column">
<div class="box-header">
<h2>Last 30 Days</h2>
</div>
<div class="box">
<p>Unique Players: ${playersMonth}<br>
Unique / Day: ${playersAverageMonth}</p>
<p>New Players: ${playersNewMonth}<br>
New / Day: ${playersNewAverageMonth}</p>
</div>
</div>
</div>
</div>
<div id="tab-sessions" class="tab">
<div class="row" style="flex-grow: 2; width: 140%;">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-calendar" aria-hidden="true"></i> 50 Most Recent Sessions</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table">
<thead>
<tr>
<th>Player</th>
<th>Started</th>
<th>Length</th>
<th>World - Time</th>
</tr>
</thead>
<tbody>
${tableBodySessions}
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> World Playtime</h2>
</div>
<div class="box-footer">
<div id="worldPie" style="width: 100%; height: 450px;"></div>
</div>
<div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> Playerbase</h2>
</div>
<div class="box-footer">
<div id="activityPie" style="width: 100%; height: 450px;"></div>
</div>
</div>
</div>
</div>
<div id="tab-performance" class="tab">
<div class="column">
<div class="row"> <!--First row (horizontal)-->
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Ticks Per Second</h2>
</div>
<div class="box-footer">
<div id="tpsGraph" style="width: 100%; height: 700px;"></div>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Resource Usage</h2>
</div>
<div class="box-footer">
<div id="resourceGraph" style="width: 100%; height: 700px;"></div>
</div>
</div>
</div> <!--First row (horizontal)-->
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> World Load</h2>
</div>
<div class="box-footer">
<div id="worldGraph" style="width: 100%; height: 700px;"></div>
</div>
</div>
<div class="row">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cogs" aria-hidden="true"></i> Last 24 Hours</h2>
</div>
<div class="box">
<p><b>Averages:</b></p>
<ul>
<li>TPS: ${tpsAverageDay}</li>
<li>CPU: ${cpuAverageDay}</li>
<li>RAM: ${ramAverageDay}</li>
<li>Entities: ${entityAverageDay}</li>
<li>Chunks: ${chunkAverageDay}</li>
</ul>
</div>
</div>
<div class="column">
<div class="box-header">
<h2><i class="fa fa-cogs" aria-hidden="true"></i> Last 7 Days</h2>
</div>
<div class="box">
<p><b>Averages:</b></p>
<ul>
<li>TPS: ${tpsAverageWeek}</li>
<li>CPU: ${cpuAverageWeek}</li>
<li>RAM: ${ramAverageWeek}</li>
<li>Entities: ${entityAverageWeek}</li>
<li>Chunks: ${chunkAverageWeek}</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="tab-playerlist" class="tab">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-list" aria-hidden="true"></i> Playerlist</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table">
<thead>
<tr>
<th><i class="fa fa-user" aria-hidden="true"></i> Player</th>
<th><i class="fa fa-check" aria-hidden="true"></i> Active</th>
<th><i class="fa fa-clock-o" aria-hidden="true"></i> Playtime</th>
<th><i class="fa fa-calendar-plus-o" aria-hidden="true"></i> Login times</th>
<th><i class="fa fa-user-plus" aria-hidden="true"></i> Registered</th>
<th><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Last seen</th>
<th><i class="fa fa-globe" aria-hidden="true"></i> Geolocation</th>
</tr>
</thead>
<tbody>
${tableBodyPlayerList}
</tbody>
</table>
</div>
</div>
</div>
<div id="tab-command-usage" class="tab">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-list" aria-hidden="true"></i> Playerlist</h2>
</div>
<div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table">
<thead>
<tr>
<th><i class="fa fa-chevron-right" aria-hidden="true"></i> Command</th>
<th><i class="fa fa-list-ol" aria-hidden="true"></i> Times used</th>
</tr>
</thead>
<tbody>
${tableBodyCommands}
</tbody>
</table>
</div>
</div>
</div>
<div id="tab-demographics" class="tab">
<div class="column">
<div class="box-header">
<h2><i class="fa fa-globe" aria-hidden="true"></i> Geolocations</h2>
</div>
<div class="box-footer" style="padding: 2px;">
<div id="choropleth" style="width: 100%; height: 700px;"></div>
</div>
</div>
</div>
<div id="tab-plugins" class="tab column">
${tabContentPlugins}
</div>
</div>
</div>
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/maps/modules/map.js"></script>
<script src="https://code.highcharts.com/mapdata/custom/world.js"></script>
<script src="./js/activityPie.js"></script>
<script src="./js/gmPie.js"></script>
<script src="./js/playerGraph.js"></script>
<script src="./js/punchCard.js"></script>
<script src="./js/resourceGraph.js"></script>
<script src="./js/sessionDistributionChart.js"></script>
<script src="./js/tpsGraph.js"></script>
<script src="./js/worldGraph.js"></script>
<script src="./js/worldMap.js"></script>
<script src="./js/worldPie.js"></script>
<script>
Highcharts.setOptions({
global: {
timezoneOffset: ${timeZone} * 60
}
});
// Data Variables
var playersOnlineSeries = {
name: 'Players Online',
data: ${playersOnlineSeries},
type: 'areaspline',
color: '${playersGraphColor}',
tooltip: {
valueDecimals: 0
}
};
var tpsSeries = {
name: 'TPS',
data: ${tpsSeries},
type: 'spline',
zones: [{
value: ${tpsMedium},
color: '${tpsLowColor}'
}, {
value: ${tpsHigh},
color: '${tpsMediumColor}'
}, {
value: 30,
color: '${tpsHighColor}'
}],
tooltip: {
valueDecimals: 2
},
yAxis: 1
};
var cpuSeries = {
name: 'CPU Usage',
data: ${cpuSeries},
type: 'areaspline',
color: '#e0d264',
tooltip: {
pointFormat: '{series.name}: <b>{point.y:.2f}%</b>'
}
};
var ramSeries = {
name: 'RAM Usage',
data: ${ramSeries},
type: 'areaspline',
color: '#7dcc24',
tooltip: {
valueDecimals: 0
},
yAxis: 1
};
var entitySeries = {
name: 'Loaded Entities',
data: ${entitySeries},
type: 'areaspline',
color: '#ac69ef',
tooltip: {
valueDecimals: 0
},
yAxis: 1
};
var chunkSeries = {
name: 'Loaded Chunks',
data: ${chunkSeries},
type: 'areaspline',
color: '#b58310',
tooltip: {
valueDecimals: 0
}
};
var activitySeries = {
name: 'Players',
colorByPoint: true,
data: [{
name: 'Active',
y: ${active}
}, {
name: 'Inactive',
y: ${inactive},
sliced: true,
selected: true
}, {
name: 'Single Join',
y: ${joinLeaver}
}, {
name: 'Banned',
y: ${banned}
}]
};
var gmData = ${gmData};
var gmSeries = {
name: 'GM Usage',
colorByPoint: true,
data: [{
name: 'Survival',
y: gmData[0],
sliced: true,
selected: true
}, {
name: 'Creative',
y: gmData[1]
}, {
name: 'Adventure',
y: gmData[2]
}, {
name: 'Spectator',
y: gmData[3]
}]
};
var worldSeries = {
name: 'World Playtime',
colorByPoint: true,
data: ${worldSeries}
};
var mapSeries = {
name: 'Players',
type: 'map',
mapData: Highcharts.maps['custom/world'],
data: ${geoMapSeries}
joinBy: ['iso-a3', 'code']
};
var sessionLengthSeries = {
name: 'Sessions',
color: '#89c471',
data: ${sessionLengthSeries}
};
var punchcardSeries = {
name: 'Relative Activity',
color: '#222',
data: ${punchCardSeries}
};
</script>
<script>
var navButtons = document.getElementsByClassName("nav-button");
var tabs = document.getElementsByClassName("tab");
var slideIndex = window.sessionStorage.getItem("AnalysisSlideIndex");
if (slideIndex === null) {
slideIndex = 0;
}
var x = document.getElementById("main");
x.style.transform = "translate3d(0px,0px,0)";
x.style.width = "" + navButtons.length * 100 + "%";
for (var i = 0; i < navButtons.length; i++) {
navButtons[i].onclick = openFunc(i)
tabs[i].style.width = "" + 100 / navButtons.length + "%";
}
x.style.opacity = "1";
openFunc(slideIndex)();
/*gmPie('gmPie', gmSeries, '${gmTotal}', [${gmColors}]);
activityPie('activityPie', activitySeries, ${playersTotal}, [${activityColors}]);
worldPie('worldPie', worldSeries, '${worldTotal}');
playersChart('playerChartDay', playersOnlineSeries, 1);
playersChart('playerChartMonth', playersOnlineSeries, 4);
tpsChart('tpsGraph', tpsSeries, playersOnlineSeries);
resourceChart('resourceGraph', cpuSeries, ramSeries);
worldChart('worldGraph', entitySeries, chunkSeries);
worldMap('choropleth', '#EEFFEE', '#267f00', mapSeries);
sessionDistributionChart('sessionDistribution', sessionLengthSeries);
punchCard('punchcard', punchcardSeries);
countUpTimer();*/
function openFunc(i) {
return function() {
var max = navButtons.length;
for (var j = 0; j < max; j++) {
if (j === i) {
navButtons[j].classList.add('active');
continue;
}
if (navButtons[j].classList.contains('active')) {
navButtons[j].classList.remove('active');
}
}
var perc = - 100 / navButtons.length;
slideIndex = i;
if (slideIndex > max) {slideIndex = 0};
if (slideIndex < 0) {slideIndex = max};
window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex);
var value = slideIndex * perc;
x.style.transition = "0.5s";
x.style.transform = "translate3d(" + value + "%,0px,0)";
};
}
</script>
</div>
</body>
</html>

View File

@ -0,0 +1,26 @@
function activityPie(id, activitySeries, activityTotal, activityColors) {
var myChart = Highcharts.chart(id, {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
subtitle: {text: 'Total Players:' + activityTotal},
tooltip: {
pointFormat: '{series.name}: <b>{point.y}</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
colors: activityColors,
showInLegend: true
}
},
series: [activitySeries]
});
}

View File

@ -0,0 +1,24 @@
function gmPie(id, gmSeries, gmtotal, gmColors) {
Highcharts.chart(id, {
chart: {
plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false,
type: 'pie'
},
subtitle: {text: gmtotal},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.2f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
colors: gmColors,
showInLegend: true
}
},
series: [gmSeries]
});
}

View File

@ -0,0 +1,33 @@
function playersChart(id, playersOnlineSeries, sel) {
Highcharts.stockChart(id, {
rangeSelector: {
selected: sel,
buttons: [{
type: 'hour',
count: 12,
text: '12h'
},{
type: 'hour',
count: 24,
text: '24h'
},{
type: 'day',
count: 7,
text: '7d'
},{
type: 'month',
count: 1,
text: '30d'
},{
type: 'all',
text: 'All'
}]
},
plotOptions: {
areaspline: {
fillOpacity: 0.4
}
},
series: [playersOnlineSeries]
});
}

View File

@ -0,0 +1,8 @@
$(".plugins-header").click(function () {
$header = $(this);
$content = $header.next();
$(this).parent().siblings().children().next().slideUp(500);
$content.slideToggle(500, function () {
//execute this after slideToggle is done
});
});

View File

@ -0,0 +1,21 @@
function punchCard(id, punchcardSeries) {
Highcharts.chart(id, {
chart: {
defaultSeriesType: 'scatter'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
hour: '%I %P'
},
tickInterval: 3600000
},
yAxis: {
categories: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
},
tooltip: {
pointFormat: 'Activity: {point.z}'
},
series: [punchcardSeries]
});
}

View File

@ -0,0 +1,59 @@
function resourceChart(id, cpuSeries, ramSeries) {
var myChart = Highcharts.stockChart(id, {
rangeSelector: {
selected: 1,
buttons: [{
type: 'hour',
count: 12,
text: '12h'
},{
type: 'hour',
count: 24,
text: '24h'
},{
type: 'day',
count: 7,
text: '7d'
},{
type: 'month',
count: 1,
text: '30d'
},{
type: 'all',
text: 'All'
}]
},
yAxis: [{
labels: {
align: 'right',
x: -3
},
title: {
text: 'CPU / %'
},
height: '55%',
lineWidth: 2
}, {
labels: {
align: 'right',
x: -3
},
title: {
text: 'RAM / MB'
},
top: '55%',
height: '40%',
offset: 0,
lineWidth: 2
}],
tooltip: {
split: true
},
plotOptions: {
areaspline: {
fillOpacity: 0.4
}
},
series: [cpuSeries, ramSeries]
});
}

View File

@ -0,0 +1,29 @@
function sessionDistributionChart(id, sessionLengthSeries) {
Highcharts.chart(id, {
chart: {
type: 'column'
},
xAxis: {
type: 'category',
labels: {
rotation: -45
}
},
yAxis: {
min: 0,
title: {
text: 'Sessions'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
groupPadding: 0
},
pointPadding: 0
},
series: [sessionLengthSeries]
});
}

View File

@ -0,0 +1,8 @@
$(".session-header").click(function () {
$header = $(this);
$content = $header.next();
$(this).parent().siblings().children().next().slideUp(500);
$content.slideToggle(500, function () {
//execute this after slideToggle is done
});
});

View File

@ -0,0 +1,59 @@
function tpsChart(id, tpsSeries, playersOnlineSeries) {
var myChart = Highcharts.stockChart(id, {
rangeSelector: {
selected: 1,
buttons: [{
type: 'hour',
count: 12,
text: '12h'
},{
type: 'hour',
count: 24,
text: '24h'
},{
type: 'day',
count: 7,
text: '7d'
},{
type: 'month',
count: 1,
text: '30d'
},{
type: 'all',
text: 'All'
}]
},
yAxis: [{
labels: {
align: 'right',
x: -3
},
title: {
text: 'Players'
},
height: '30%',
}, {
lineWidth: 2,
labels: {
align: 'right',
x: -3
},
title: {
text: 'TPS'
},
height: '70%',
top: '30%',
offset: 0,
lineWidth: 2
}],
tooltip: {
split: true
},
plotOptions: {
areaspline: {
fillOpacity: 0.4
}
},
series: [tpsSeries, playersOnlineSeries]
});
}

View File

@ -0,0 +1,59 @@
function worldChart(id, entitySeries, chunkSeries) {
var myChart = Highcharts.stockChart(id, {
rangeSelector: {
selected: 1,
buttons: [{
type: 'hour',
count: 12,
text: '12h'
},{
type: 'hour',
count: 24,
text: '24h'
},{
type: 'day',
count: 7,
text: '7d'
},{
type: 'month',
count: 1,
text: '30d'
},{
type: 'all',
text: 'All'
}]
},
yAxis: [{
labels: {
align: 'right',
x: -3
},
title: {
text: 'Chunks'
},
height: '50%',
lineWidth: 2
}, {
labels: {
align: 'right',
x: -3
},
title: {
text: 'Entities'
},
top: '50%',
height: '40%',
offset: 0,
lineWidth: 2
}],
tooltip: {
split: true
},
plotOptions: {
areaspline: {
fillOpacity: 0.4
}
},
series: [entitySeries, chunkSeries]
});
}

View File

@ -0,0 +1,14 @@
function worldMap(id, colorMin, colorMax, mapSeries) {
var myChart = Highcharts.mapChart(id, {
chart: {
animation: true
},
colorAxis: {
min: 1,
type: 'logarithmic',
minColor: colorMin,
maxColor: colorMax
},
series: [mapSeries]
});
}

View File

@ -0,0 +1,25 @@
function worldPie(id, worldSeries, worldTotal) {
var myChart = Highcharts.chart(id, {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
subtitle: {text: worldTotal},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.2f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [worldSeries]
});
}

View File

@ -0,0 +1,327 @@
.black {
color: #000000;
}
.darkblue {
color: #0000AA;
}
.darkgreen {
color: #00AA00;
}
.darkaqua {
color: #00AAAA;
}
.darkred {
color: #AA0000;
}
.darkpurple {
color: #AA00AA;
}
.gold {
color: #FFAA00;
}
.gray {
color: #AAAAAA;
}
.darkgray {
color: #555555;
}
.blue {
color: #5555FF;
}
.green {
color: #55FF55;
}
.aqua {
color: #55FFFF;
}
.red {
color: #FF5555;
}
.pink {
color: #FF55FF;
}
.yellow {
color: #FFFF55;
text-shadow: 0px 0px 6px #000;
}
.white {
color: #FFFFFF;
text-shadow: 0px 0px 8px #000;
}
body {
font-family: 'Quicksand', sans-serif;
background-color: #ddd;
color: #fff;
font-weight: 400;
}
header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 80px;
padding: 0;
background-color: #348e0f;
z-index: 1;
}
header h1 {
font-weight: 500;
font-size: 55px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 10px;
}
header p {
font-weight: 400;
}
header div {
padding: 5pxpx 20px;
}
.right {
float: right;
}
.left {
float: left;
}
.button {
background-color: #5da341;
text-decoration: none!important;
color: #fff;
padding: 10px 20px;
text-align: center;
}
.button:hover {
background-color: #348e0f;
}
.link {
color: #5da341;
text-decoration: none!important;
}
.button:hover {
background-color: #348e0f;
}
.disabled {
background-color: #89c471;
}
.disabled:hover {
background-color: #89c471;
}
.content {
margin-top: 100px;
margin-left: 15%;
margin-right: 15%;
width: 70%;
}
.content-server {
margin-top: 100px;
margin-left: 10%;
margin-right: 10%;
width: 80%;
}
.box-header {
color: #fff;
background-color: #5da341;
padding: 5px 20px;
text-align: left;
margin: 5px 5px 0px 5px;
}
.box {
background-color: #fff;
padding: 5px 20px;
color: #000;
text-align: left;
margin: 0px 5px;
}
.box-footer {
vertical-align: middle;
display: inline-block;
background-color: #fff;
padding: 5px 10px 5px 20px;
color: #000;
text-align: left;
margin: 2px 5px 5px 5px;
}
.box-footer p {
display: inline-block;
}
.box-footer a {
margin-top: 5px;
display: inline-block;
}
.plugin {
max-height: 300px;
overflow-y: auto;
height: 100%;
}
.row {
width: 100%;
display: flex;
flex-direction: row;
}
.column {
width: 100%;
display: flex;
flex-direction: column;
}
.nav-bar {
}
.nav-button {
font-size: 20px;
font-weight: 400;
padding: 5px 10px;
margin: 5px;
text-decoration: none!important;
color: #fff;
background-color: #5da341;
}
.nav-button:hover {
background-color: #348e0f;
}
.active {
background-color: #348e0f;
}
table {
width: 100%;
}
thead th {
color: #fff;
background-color: #5da341;
font-weight: 600;
}
th {
padding: 5px;
font-weight: 400;
}
th.text {
font-size: 120%;
}
tr:nth-child(even) {background: #e2e2e2}
tr:nth-child(odd) {background: #eee}
.main-limiter {
width: 100%;
height: 100%;
overflow: hidden;
}
.main-wrapper {
transform: translate3d(0, 0, 0);
opacity: 0;
transition: 1.5s;
width: 100%;
display: flex;
flex-direction: row;
}
.tab {
width: 20%;
height: 100%;
display: flex;
align-content: flex-start;
}
.scrollbar {
max-height: 650px;
overflow-y: auto;
}
.session-header h3 {
margin: 0px;
}
.session-header p {
margin: 0px;
}
.session {
}
.session-header {
background: #ddd;
color: #000;
margin: 1px 3px;
display: flex;
flex-direction: row;
padding: 0px;
}
.session-col {
width: 100%;
background: #fff;
color: #000;
margin: 0px 2px;
display: flex;
flex-direction: column;
padding: 10px 20px;
}
.session-content {
display: none;
margin: 2px 10px;
flex-direction: row;
}
.plugins-content {
display: none;
}
.plugins-header h2 {
margin: 0px;
}
.plugins-header p {
margin: 0px;
}
@media only screen and (max-width: 1680px) {
.nav-button {
font-size: 19px;
}
}
@media only screen and (max-width: 1150px) {
header h1 {
font-weight: 400;
font-size: 40px;
}
.content {
margin-top: 100px;
margin-left: 0%;
margin-right: 0%;
width: 100%;
}
.content-server {
margin-top: 100px;
margin-left: 0%;
margin-right: 0%;
width: 100%;
}
.nav-bar {
flex-wrap:wrap;
}
}
@media only screen and (max-width: 850px) {
header h1 {
font-weight: 400;
font-size: 30px;
}
}
@media only screen and (max-width: 780px) {
.scrollbar {
overflow-x: auto;
width: 100%;
}
.nav-bar {
flex-direction: row;
}
.row {
flex-direction: column;
}
header p {
display: none;
}
}

View File

@ -1,779 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Plan | Inspect %name%</title>
<meta name="description" content="Player Analysis window">
<meta name="author" content="Rsl1122">
<link rel="icon" href="https://puu.sh/tK0KL/6aa2ba141b.ico" type="image/x-icon"/>
<script src="https://use.fontawesome.com/df48eb908b.js"></script>
<style>
header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 88px;
padding: 0;
background-color: #348e0f;
z-index: 1;
}
.header-content {
padding: 5px 20px;
}
body {
font-family: Verdana, sans-serif;
background-color: #ddd;
color: #fff;
}
.sidenav {
height: 100%;
width: 15%;
position: fixed;
top: 0;
left: 0;
background-color: #5cb239;
overflow-x: hidden;
transition: 0.5s;
padding-top: 88px;
text-align: left;
}
.sidenav p {
width: 100%;
padding: 8px 8px 8px 16px;
text-decoration: none;
background-color: #89c471;
color: #fff;
margin: 10px 0;
}
.sidenav a {
margin: 10px 0;
width: 100%;
padding: 8px 8px 8px 16px;
text-decoration: none;
background-color: #89c471;
font-size: 22px;
color: #fff;
display: block;
transition: 0.3s;
z-index: 1;
}
.sidenav a.active {
background-color: #5da341
}
.sidenav a:hover, .offcanvas a:focus{
background-color: #5da341;
}
.main-limiter {
margin-left: 15%;
width: 85%;
height: 100%;
overflow: hidden;
}
.main-wrapper {
padding-top: 88px;
transform: translate3d(0, 0, 0);
opacity: 0;
transition: 1.5s;
}
.box {
background-color: #fff;
padding: 5px;
text-decoration: none;
color: #000;
text-align: left;
margin: 5px;
}
.box p {
color: #000;
}
.tab {
width: 20%;
height: 100%;
float: left;
display: flex;
text-align: left;
align-content: flex-start;
}
.row {
width: 50%;
display: flex;
flex-direction: column;
}
.content {
text-align: center;
padding: 5px;
margin: 0;
}
.columns {
display: flex;
}
.column {
flex: 1;
}
.infobox {
margin-left: 3px;
color: white;
background-color: #348e0f;
padding: 8px 14px;
border-radius: 10px;
float: right;
}
.info-text {
float: right;
width: 50%;
text-align: right;
}
.info-number {
font-size: x-large;
float: right;
}
.info-label {
float: right;
font-size: medium;
}
.info-icon {
font-size: xx-large;
float: left;
}
.headerbox {
color: #348e0f;
display: inline-block;
border: solid #348e0f;
padding: 8px 14px;
border-radius: 10px;
width: 95%;
}
.header-icon {
font-size: xx-large;
float: left;
}
.header-text {
font-size: x-large;
}
.header-label {
padding: 0;
margin: 0;
border: 0;
}
.table {
border-collapse: collapse;
table-layout: fixed;
border: 1px solid;
padding: 8px 14px;
width: 100%;
}
.link {
color: #348e0f;
text-decoration:none!important;
}
.link:hover {
color: #267F00;
}
table.sortable thead {
background-color: #348e0f;
color:#fff;
font-weight: bold;
cursor: default;
width: 100%;
overflow: hidden;
}
table.sortable tbody {
color: #000;
}
table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sorttable_nosort):after {
content: " \25B4\25BE"
}
.plugin-container {
color: #000;
height: 100%;
max-height: 400px;
overflow: auto;
}
.plugin-data {
color: #000;
}
.black {
color: #000000;
}
.darkblue {
color: #0000AA;
}
.darkgreen {
color: #00AA00;
}
.darkaqua {
color: #00AAAA;
}
.darkred {
color: #AA0000;
}
.darkpurple {
color: #AA00AA;
}
.gold {
color: #FFAA00;
}
.gray {
color: #AAAAAA;
}
.darkgray {
color: #555555;
}
.blue {
color: #5555FF;
}
.green {
color: #55FF55;
}
.aqua {
color: #55FFFF;
}
.red {
color: #FF5555;
}
.pink {
color: #FF55FF;
}
.yellow {
color: #FFFF55;
}
.white {
color: #FFFFFF;
}
#navbutton {
display: none;
font-size: 40px;
cursor:pointer;
}
@media only screen and (max-width: 850px) {
#navbutton {
display: inline;
}
.sidenav p {
display: none;
}
header {
margin: 0;
padding: 0;
}
header h1 {
margin: 0;
}
header img {
margin: 0px;
padding: 0;
}
header p {
margin: 5px 0px 0px;
}
.tab {
flex-direction: column;
}
.columns {
flex-direction: column;
}
.row {
width: 100%;
}
.sidenav {
width: 0;
transition: 0s;
}
.main-limiter {
margin-left: 0;
width: 100%;
}
}
</style>
</head>
<body>
<header>
<div class="header-content">
<img style="float: right; padding: 5px" src="https://puu.sh/tJZUb/c2e0ab220f.png"
alt="Player Analytics | Analysis">
<p style="float: right; text-align: right;">Player Analytics v.%version%</p>
<h1><span id="navbutton" onclick="openNav()">&#9776; </span>%servername% | Inspect Player %name%%op%</h1>
</div>
</header>
<div id="content" class="content">
<div id="sidenav" class="sidenav">
<p>Last Refresh: <br><span id="divTime">%refresh%</span> ago</p>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-info-circle" aria-hidden="true"></i> Information
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-calendar" aria-hidden="true"></i> Sessions
</a>
<a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cubes" aria-hidden="true"></i> Plugins
</a>
</div>
<div id="limiter" class="main-limiter">
<div id="main" class="main-wrapper">
<div class="tab">
<div class="row">
<div class="about box column">
<div class="headerbox">
<div class="header-icon">
<div class="header-label"><i class="fa fa-info-circle" aria-hidden="true"></i><span
class="header-text"> Information</span></div>
</div>
<div class="infobox" style="float: right;">
<div class="info-icon">
<i class="fa fa-user-plus" aria-hidden="true"></i>
</div>
<div class="info-text" style="width: 70%;">
<div class="info-number">
%registered%
</div>
<div class="info-label">
Registered
</div>
</div>
</div>
</div>
<img style="float: right; padding: 5px" alt="%name%"
src="https://cravatar.eu/head/%name%/128.png">
<p><i class="fa fa-user" aria-hidden="true"></i> %active% %isonline%%banned%<br/>
<i class="fa fa-address-card-o" aria-hidden="true"></i> Nicknames: %nicknames%<br/>
<i class="fa fa-clock-o" aria-hidden="true"></i> Playtime: %playtime%<br/>
<i class="fa fa-calendar-plus-o" aria-hidden="true"></i> Login times: %logintimes%<br/>
<i class="fa fa-gavel" aria-hidden="true"></i> Times kicked: %timeskicked%<br/>
<i class="fa fa-crosshairs" aria-hidden="true"></i> Player kills: %playerkills% | <i
class="fa fa-crosshairs" aria-hidden="true"></i> Mob kills: %mobkills% | <i
class="fa fa-meh-o" aria-hidden="true"></i> Deaths: %deaths%<br/>
<br/>
<i class="fa fa-globe" aria-hidden="true"></i> Geolocation: %geoloc%<br/>
<i class="fa fa-tag" aria-hidden="true"></i> UUID: %uuid%<br/>
<i class="fa fa-globe" aria-hidden="true"></i> Has Connected from ips: %ips%</p>
</div>
<div class="about box column">
<div id="worldPie" style="width: 100%; height: 400px;"></div>
</div>
<div class="about box column">
<div id="gmPie" style="width: 100%; height: 400px;"></div>
</div>
</div>
<div class="row">
<div class="about box column">
<div class="headerbox">
<div class="header-icon">
<div class="header-label"><i class="fa fa-bar-chart" aria-hidden="true"></i><span
class="header-text"> Player Activity: 7d</span></div>
</div>
<div class="infobox" style="float: right;">
<div class="info-icon">
<i class="fa fa-calendar-check-o" aria-hidden="true"></i>
</div>
<div class="info-text" style="width: 70%;">
<div class="info-number">
%lastseen%
</div>
<div class="info-label">
Last seen
</div>
</div>
</div>
</div>
<div id="playerChart" style="width:100%; height:350px;"></div>
</div>
<div class="about box column">
<div class="headerbox">
<div class="header-icon">
<div class="header-label"><i class="fa fa-crosshairs" aria-hidden="true"></i><span
class="header-text"> Last 25 Kills</span></div>
</div>
<div class="infobox" style="float: right;">
<div class="info-icon">
<i class="fa fa-crosshairs" aria-hidden="true"></i>
</div>
<div class="info-text" style="width: 70%;">
<div class="info-number">
%playerkills%
</div>
<div class="info-label">
Player Kills
</div>
</div>
</div>
</div>
%killstable%
</div>
</div>
</div>
<div class="tab">
<div class="row">
<div class="about box column">
<div class="headerbox">
<div class="header-icon" style="width: 50%">
<div class="header-label"><i class="fa fa-braille" aria-hidden="true"></i><span
class="header-text"> PunchCard</span></div>
</div>
<div class="infobox">
<div class="info-icon">
<i class="fa fa-calendar-plus-o" aria-hidden="true"></i>
</div>
<div class="info-text" style="width: 70%;">
<div class="info-number">
%logintimes%
</div>
<div class="info-label">
Login Times
</div>
</div>
</div>
</div>
<div id="punchcard" style="width: 100%; height:400px;"></div>
</div>
</div>
<div class="row">
<div class="about box column">
<div class="headerbox">
<div class="header-icon">
<div class="header-label"><i class="fa fa-bar-chart" aria-hidden="true"></i><span
class="header-text"> Length Distribution</span></div>
</div>
<div class="infobox">
<div class="info-icon">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
<div class="info-text" style="width: 70%;">
<div class="info-number">
%sessionaverage%
</div>
<div class="info-label">
Average Length
</div>
</div>
</div>
</div>
<div id="sessionDistribution" style="width: 100%; height:400px;"></div>
</div>
</div>
</div>
<div class="tab" style="display: block;">
%plugins%
</div>
</div>
</div>
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script>
Highcharts.setOptions({
global: {
timezoneOffset: %timezone% * 60
}
});
function formatTime(seconds) {
var out = "";
seconds = Math.floor(seconds / 1000);
var dd = Math.floor(seconds / 86400);
seconds -= (dd * 86400);
var dh = Math.floor(seconds / 3600);
seconds -= (dh * 3600);
var dm = Math.floor(seconds / 60);
seconds -= (dm * 60);
seconds = Math.floor(seconds);
if (dd !== 0) {
out += dd.toString() + "d ";
}
if (dh !== 0) {
out += dh.toString() + "h ";
}
if (dm !== 0) {
out += dm.toString() + "m ";
}
out += seconds.toString() + "s ";
return out;
}
var playersOnlineSeries = {
name: 'Online',
data: %playersonlineseries%,
type: 'areaspline',
color: '#%playersgraphcolor%',
tooltip: {
valueDecimals: 0
}
};
var gmData = %gmdata%;
var gmSeries = {
name: 'GM Usage',
colorByPoint: true,
data: [{
name: 'Survival',
y: gmData[0],
sliced: true,
selected: true
}, {
name: 'Creative',
y: gmData[1]
}, {
name: 'Adventure',
y: gmData[2]
}, {
name: 'Spectator',
y: gmData[3]
}]
};
var worldSeries = {
name: 'World Playtime',
colorByPoint: true,
data: %worldseries%
};
var sessionLengthSeries = {
name: 'Sessions',
color: '#89c471',
data: %sessionlengthseries%
};
var punchcardSeries = {
name: 'Relative Activity',
color: '#222',
data: %punchcardseries%
};
</script>
<script>
function playersChart() {
Highcharts.stockChart('playerChart', {
rangeSelector: {
selected: 2,
buttons: [{
type: 'hour',
count: 12,
text: '12h'
},{
type: 'hour',
count: 24,
text: '24h'
},{
type: 'day',
count: 7,
text: '7d'
},{
type: 'month',
count: 1,
text: '30d'
},{
type: 'all',
text: 'All'
}]
},
plotOptions: {
areaspline: {
fillOpacity: 0.4
}
},
title: {text: 'Online Activity'},
series: [playersOnlineSeries]
});
}
</script>
<script>
function gmPie() {
Highcharts.chart('gmPie', {
chart: {
plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false,
type: 'pie'
},
title: {text: 'Gamemode Usage'},
subtitle: {text: '%gmtotal%'},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.2f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
colors: [%gmcolors%],
showInLegend: true
}
},
series: [gmSeries]
});
};
</script>
<script>
function worldPie() {
Highcharts.chart('worldPie', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {text: 'World Playtime'},
subtitle: {text: '%worldtotal%'},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.2f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [worldSeries]
});
};
</script>
<script>
function punchCard() {
Highcharts.chart('punchcard' , {
chart: {
defaultSeriesType: 'scatter'
},
title: {
text: 'Player Join PunchCard'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
hour: '%I %P'
},
tickInterval: 3600000
},
yAxis: {
categories: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']
},
tooltip: {
pointFormat: 'Activity: {point.z}'
},
series: [punchcardSeries]
});
}
</script>
<script>
function sessionDistributionChart() {
Highcharts.chart('sessionDistribution', {
chart: {
type: 'column'
},
title: {
text: 'Session Length Distribution'
},
xAxis: {
type: 'category',
labels: {
rotation: -45
}
},
yAxis: {
min: 0,
title: {
text: 'Sessions'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
groupPadding: 0
},
pointPadding: 0
},
series: [sessionLengthSeries]
});
};
</script>
<script>
function openNav() {
document.getElementById("sidenav").style.width = "100%";
document.getElementById("limiter").style.display = "none";
document.getElementById("navbutton").onclick = function () { closeNav(); };
}
function closeNav() {
document.getElementById("sidenav").style.width = "0%";
document.getElementById("limiter").style.display = "block";
document.getElementById("navbutton").onclick = function () { openNav(); };
}
var navButtons = document.getElementsByClassName("nav-button");
var tabs = document.getElementsByClassName("tab");
var slideIndex = window.sessionStorage.getItem("InspectSlideIndex");
if (slideIndex === null) {
slideIndex = 0;
}
var x = document.getElementById("main");
x.style.transform = "translate3d(0px,0px,0)";
x.style.width = ""+navButtons.length*100+"%";
for (var i = 0; i < navButtons.length; i++) {
navButtons[i].onclick = openFunc(i)
tabs[i].style.width = ""+100/navButtons.length+"%";
}
x.style.opacity = "1";
openFunc(slideIndex)();
playersChart();
sessionDistributionChart();
gmPie();
worldPie();
punchCard();
countUpTimer();
function openFunc(i) {
return function() {
if (window.getComputedStyle(document.getElementById("navbutton")).getPropertyValue('display') === "inline") {
closeNav();
}
var max = navButtons.length;
for (var j = 0; j < max; j++) {
if (j === i) {
navButtons[j].classList.add('active');
continue;
}
if (navButtons[j].classList.contains('active')) {
navButtons[j].classList.remove('active');
}
}
var perc = -100 / navButtons.length;
slideIndex = i;
if (slideIndex>max) {slideIndex=0};
if (slideIndex<0) {slideIndex=max};
window.sessionStorage.setItem("InspectSlideIndex", slideIndex);
var value = slideIndex*perc;
x.style.transition = "0.5s";
x.style.transform = "translate3d("+value+"%,0px,0)";
};
}
function countUpTimer() {
var now = new Date();
var begin = new Date(%refreshlong%);
var seconds = now.getTime() - begin.getTime();
document.getElementById('divTime').innerHTML = formatTime(seconds);
setTimeout('countUpTimer()', 1000);
}
</script>
</div>
</body>
</html>

View File

@ -17,9 +17,7 @@ import test.java.utils.TestInit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/** /**
* @author Rsl1122 * @author Rsl1122
@ -38,12 +36,12 @@ public class SettingsTest {
@Test @Test
public void testIsTrue() { public void testIsTrue() {
assertTrue("Webserver supposed to be enabled by default", Settings.WEBSERVER_ENABLED.isTrue()); assertTrue("COMBINE_COMMAND_ALIASES supposed to be true by default", Settings.COMBINE_COMMAND_ALIASES.isTrue());
} }
@Test @Test
public void testIsTrue2() { public void testIsTrue2() {
Settings gatherCommands = Settings.GATHERCOMMANDS; Settings gatherCommands = Settings.LOG_UNKNOWN_COMMANDS;
gatherCommands.setValue(false); gatherCommands.setValue(false);
assertFalse(gatherCommands.isTrue()); assertFalse(gatherCommands.isTrue());
@ -54,7 +52,7 @@ public class SettingsTest {
@Test @Test
public void testToString() { public void testToString() {
assertEquals("sqlite", Settings.DB_TYPE.toString()); assertEquals("SQLite", Settings.DB_TYPE.toString());
} }
@Test @Test
@ -72,6 +70,6 @@ public class SettingsTest {
@Test @Test
public void testGetPath() { public void testGetPath() {
assertEquals("Settings.WebServer.Enabled", Settings.WEBSERVER_ENABLED.getPath()); assertEquals("WebServer.Port", Settings.WEBSERVER_PORT.getPath());
} }
} }

View File

@ -88,7 +88,7 @@ public class TestInit {
when(planMock.getDataFolder()).thenReturn(testFolder); when(planMock.getDataFolder()).thenReturn(testFolder);
// Html Files // Html Files
File analysis = new File(getClass().getResource("/analysis.html").getPath()); File analysis = new File(getClass().getResource("/server.html").getPath());
when(planMock.getResource("analysis.html")).thenReturn(new FileInputStream(analysis)); when(planMock.getResource("analysis.html")).thenReturn(new FileInputStream(analysis));
File player = new File(getClass().getResource("/player.html").getPath()); File player = new File(getClass().getResource("/player.html").getPath());
when(planMock.getResource("player.html")).thenReturn(new FileInputStream(player)); when(planMock.getResource("player.html")).thenReturn(new FileInputStream(player));