Merge pull request #266 from Fuzzlemann/master

PR for 4.0.0 (Fuzzlemann) (4)
This commit is contained in:
Rsl1122 2017-08-21 09:05:20 +03:00 committed by GitHub
commit b8d2321584
31 changed files with 228 additions and 174 deletions

View File

@ -45,11 +45,11 @@ public enum Settings {
LOCALE("Plugin.Locale"), LOCALE("Plugin.Locale"),
WEBSERVER_IP("WebServer.InternalIP"), WEBSERVER_IP("WebServer.InternalIP"),
ANALYSIS_EXPORT_PATH("Analysis.Export.DestinationFolder"), ANALYSIS_EXPORT_PATH("Analysis.Export.DestinationFolder"),
WEBSERVER_CERTIFICATE_PATH("WebServer.Security.Certificate.KeyStorePath"), WEBSERVER_CERTIFICATE_PATH("WebServer.Security.SSL-Certificate.KeyStorePath"),
WEBSERVER_CERTIFICATE_KEYPASS("WebServer.Security.Certificate.KeyPass"), WEBSERVER_CERTIFICATE_KEYPASS("WebServer.Security.SSL-Certificate.KeyPass"),
WEBSERVER_CERTIFICATE_STOREPASS("WebServer.Security.Certificate.StorePass"), WEBSERVER_CERTIFICATE_STOREPASS("WebServer.Security.SSL-Certificate.StorePass"),
WEBSERVER_CERTIFICATE_ALIAS("WebServer.Security.Certificate.Alias"), WEBSERVER_CERTIFICATE_ALIAS("WebServer.Security.SSL-Certificate.Alias"),
ETERNAL_WEBSERVER_LINK_PROTOCOL("Analysis.Export.ExternalWebServerLinkProtocol"), EXTERNAL_WEBSERVER_LINK_PROTOCOL("Analysis.Export.ExternalWebServerLinkProtocol"),
// //
SERVER_NAME("Server.ServerName"), SERVER_NAME("Server.ServerName"),
// //

View File

@ -211,15 +211,15 @@ public class API {
* <p> * <p>
* Check if the data is cached to AnalysisCache before calling this. * Check if the data is cached to AnalysisCache before calling this.
* *
* @return analysis.html with all placeholders replaced. * @return server.html with all placeholders replaced.
*/ */
public String getAnalysisHtmlAsString() { public String getAnalysisHtmlAsString() {
WebServer server = plugin.getUiServer(); WebServer server = plugin.getUiServer();
if (Verify.notNull(server)) { if (Verify.notNull(server)) {
return server.getDataReqHandler().getAnalysisHtml(); return server.getDataReqHandler().getServerHtml();
} }
DataRequestHandler reqH = new DataRequestHandler(plugin); DataRequestHandler reqH = new DataRequestHandler(plugin);
return reqH.getAnalysisHtml(); return reqH.getServerHtml();
} }
/** /**

View File

@ -21,7 +21,7 @@ import java.util.Map;
* analysed using the analysis method. * analysed using the analysis method.
* <p> * <p>
* After being analysed the ReplaceMap can be retrieved for replacing * After being analysed the ReplaceMap can be retrieved for replacing
* placeholders on the analysis.html file. * placeholders on the server.html file.
* *
* @author Rsl1122 * @author Rsl1122
* @since 3.5.2 * @since 3.5.2

View File

@ -73,7 +73,7 @@ public class HookHandler {
/** /**
* Used to get the Layout with PluginData placeholders to replace %plugins% * Used to get the Layout with PluginData placeholders to replace %plugins%
* placeholder on analysis.html. * placeholder on server.html.
* *
* @return html, getPluginsTabLayout-method * @return html, getPluginsTabLayout-method
* @see HtmlUtils * @see HtmlUtils
@ -85,7 +85,7 @@ public class HookHandler {
} }
/** /**
* Used to get the Layout with PluginData placeholders to replace %plugins% * Used to get the Layout with PluginData placeholders to replace ${plugins}
* placeholder on player.html. * placeholder on player.html.
* *
* @return html, getPluginsTabLayout-method * @return html, getPluginsTabLayout-method

View File

@ -83,7 +83,7 @@ public class ActivityPart extends RawData {
private void playerActivityGraphs() { private void playerActivityGraphs() {
List<TPS> tpsData = tpsPart.getTpsData(); List<TPS> tpsData = tpsPart.getTpsData();
addValue("playersonlineseries", PlayerActivityGraphCreator.buildSeriesDataString(tpsData)); addValue("playersonlineseries", PlayerActivityGraphCreator.buildSeriesDataString(tpsData));
addValue("%playersgraphcolor%", Settings.HCOLOR_ACT_ONL.toString()); addValue("playersgraphcolor", Settings.HCOLOR_ACT_ONL.toString());
} }
private void activityPiechart() { private void activityPiechart() {
@ -93,24 +93,24 @@ public class ActivityPart extends RawData {
final String colJoi = Settings.HCOLOR_ACTP_JON.toString(); final String colJoi = Settings.HCOLOR_ACTP_JON.toString();
final String colBan = Settings.HCOLOR_ACTP_BAN.toString(); final String colBan = Settings.HCOLOR_ACTP_BAN.toString();
addValue("%activecol%", colAct); addValue("activecol", colAct);
addValue("%inactivecol%", colIna); addValue("inactivecol", colIna);
addValue("%joinleavecol%", colJoi); addValue("joinleavecol", colJoi);
addValue("%bancol%", colBan); addValue("bancol", colBan);
String activityColors = HtmlUtils.separateWithQuotes( String activityColors = HtmlUtils.separateWithQuotes(
"#" + colAct, "#" + colIna, "#" + colJoi, "#" + colBan "#" + colAct, "#" + colIna, "#" + colJoi, "#" + colBan
); );
addValue("%activitycolors%", activityColors); addValue("activitycolors", activityColors);
String activityLabels = "[" + HtmlUtils.separateWithQuotes( String activityLabels = "[" + HtmlUtils.separateWithQuotes(
"Active", "Inactive", "Unknown", "Banned") + "]"; "Active", "Inactive", "Unknown", "Banned") + "]";
addValue("%labelsactivity%", activityLabels); addValue("labelsactivity", activityLabels);
addValue("activitydata", Arrays.toString(counts)); addValue("activitydata", Arrays.toString(counts));
addValue("%active%", counts[0]); addValue("active", counts[0]);
addValue("%inactive%", counts[1]); addValue("inactive", counts[1]);
addValue("%joinleaver%", counts[2]); addValue("joinleaver", counts[2]);
addValue("%banned%", counts[3]); addValue("banned", counts[3]);
} }
public void addBan(UUID uuid) { public void addBan(UUID uuid) {

View File

@ -58,17 +58,17 @@ public class GamemodePart extends RawData {
String col2 = Settings.HCOLOR_GMP_2.toString(); String col2 = Settings.HCOLOR_GMP_2.toString();
String col3 = Settings.HCOLOR_GMP_3.toString(); String col3 = Settings.HCOLOR_GMP_3.toString();
addValue("%gm0col%", col0); addValue("gm0col", col0);
addValue("%gm1col%", col1); addValue("gm1col", col1);
addValue("%gm2col%", col2); addValue("gm2col", col2);
addValue("%gm3col%", col3); addValue("gm3col", col3);
String gmColors = HtmlUtils.separateWithQuotes( String gmColors = HtmlUtils.separateWithQuotes(
"#" + col0, "#" + col1, "#" + col2, "#" + col3 "#" + col0, "#" + col1, "#" + col2, "#" + col3
); );
String gmLabels = "[" + HtmlUtils.separateWithQuotes( String gmLabels = "[" + HtmlUtils.separateWithQuotes(
"Survival", "Creative", "Adventure", "Spectator") + "]"; "Survival", "Creative", "Adventure", "Spectator") + "]";
addValue("%gmcolors%", gmColors); addValue("gmcolors", gmColors);
addValue("%gmlabels%", gmLabels); addValue("gmlabel", gmLabels);
// Adds Percentage indicators // Adds Percentage indicators
for (int i = 0; i < percentages.length; i++) { for (int i = 0; i < percentages.length; i++) {

View File

@ -68,7 +68,7 @@ public abstract class RawData {
/** /**
* Adds a placeholder to the replaceMap. * Adds a placeholder to the replaceMap.
* *
* @param placeholder placeholder, with or without % signs. * @param placeholder placeholder, without prefix and suffix
* @param value Any value the placeholder should be replaced with. * @param value Any value the placeholder should be replaced with.
*/ */
public void addValue(String placeholder, Serializable value) { public void addValue(String placeholder, Serializable value) {

View File

@ -2,8 +2,6 @@ package main.java.com.djrapitops.plan.database.sql;
public class Insert extends SqlParser { public class Insert extends SqlParser {
private int conditions = 0;
public Insert(String table) { public Insert(String table) {
super("INSERT INTO " + table); super("INSERT INTO " + table);
addSpace(); addSpace();

View File

@ -2,9 +2,7 @@ package main.java.com.djrapitops.plan.database.sql;
import main.java.com.djrapitops.plan.Log; import main.java.com.djrapitops.plan.Log;
public class Select extends SqlParser { public class Select extends WhereParser {
private int conditions = 0;
public Select(String start) { public Select(String start) {
super(start); super(start);
@ -24,16 +22,4 @@ public class Select extends SqlParser {
Log.debug(parser.toString()); Log.debug(parser.toString());
return parser; return parser;
} }
public Select where(String... conditions) {
append(" WHERE ");
for (String condition : conditions) {
if (this.conditions > 0) {
append(" AND ");
}
append("(").append(condition).append(")");
this.conditions++;
}
return this;
}
} }

View File

@ -0,0 +1,30 @@
/*
* Licence is provided in the jar as license.yml also here:
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
*/
package main.java.com.djrapitops.plan.database.sql;
/**
* @author Fuzzlemann
*/
public class Update extends WhereParser {
public Update(String table) {
super("UPDATE " + table + " SET");
addSpace();
}
public static Update values(String table, String... values) {
Update parser = new Update(table);
int size = values.length;
for (int i = 0; i < size; i++) {
if (size > 1 && i > 0) {
parser.append(", ");
}
parser.append(values[i] + "=?");
}
return parser;
}
}

View File

@ -0,0 +1,47 @@
/*
* Licence is provided in the jar as license.yml also here:
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
*/
package main.java.com.djrapitops.plan.database.sql;
/**
* @author Fuzzlemann
*/
public abstract class WhereParser extends SqlParser {
public WhereParser() {
super();
}
public WhereParser(String start) {
super(start);
}
private int conditions = 0;
public WhereParser where(String... conditions) {
return and(conditions);
}
public WhereParser and(String... conditions) {
return whereOperator("AND", conditions);
}
public WhereParser or(String... conditions) {
return whereOperator("OR", conditions);
}
private WhereParser whereOperator(String operator, String... conditions) {
append(" WHERE ");
for (String condition : conditions) {
if (this.conditions > 0) {
addSpace().append(operator).addSpace();
}
append("(").append(condition).append(")");
this.conditions++;
}
return this;
}
}

View File

@ -63,21 +63,20 @@ public class DataRequestHandler {
} }
/** /**
* Returns the analysis.html as string with replaced placeholders. * Returns the server.html as string with replaced placeholders.
* *
* @return the html * @return the html
*/ */
@Deprecated //analysis.html has been removed //TODO server.html public String getServerHtml() {
public String getAnalysisHtml() {
try { try {
if (!analysisCache.isCached()) { if (!analysisCache.isCached()) {
return "<h1>404 Data was not found in cache</h1>"; return "<h1>404 Data was not found in cache</h1>";
} }
return HtmlUtils.replacePlaceholders( return HtmlUtils.replacePlaceholders(
HtmlUtils.getStringFromResource("analysis.html"), HtmlUtils.getStringFromResource("server.html"),
PlaceholderUtils.getAnalysisReplaceRules(analysisCache.getData())); PlaceholderUtils.getAnalysisReplaceRules(analysisCache.getData()));
} catch (FileNotFoundException ex) { } catch (FileNotFoundException ex) {
return "<h1>404 analysis.html was not found</h1>"; return "<h1>404 server.html was not found</h1>";
} }
} }

View File

@ -10,6 +10,6 @@ public class AnalysisPageResponse extends Response {
public AnalysisPageResponse(DataRequestHandler h) { public AnalysisPageResponse(DataRequestHandler h) {
super.setHeader("HTTP/1.1 200 OK"); super.setHeader("HTTP/1.1 200 OK");
super.setContent(h.getAnalysisHtml()); super.setContent(h.getServerHtml());
} }
} }

View File

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

View File

@ -141,7 +141,7 @@ public class ExportUtility {
return; return;
} }
serverFolder.mkdirs(); serverFolder.mkdirs();
String analysisHtml = HtmlUtils.replacePlaceholders(HtmlUtils.getStringFromResource("analysis.html"), //TODO server.html String analysisHtml = HtmlUtils.replacePlaceholders(HtmlUtils.getStringFromResource("server.html"),
PlaceholderUtils.getAnalysisReplaceRules(analysisData)) PlaceholderUtils.getAnalysisReplaceRules(analysisData))
.replace(HtmlUtils.getInspectUrl(""), "../player/"); .replace(HtmlUtils.getInspectUrl(""), "../player/");
File analysisHtmlFile = new File(serverFolder, "index.html"); File analysisHtmlFile = new File(serverFolder, "index.html");

View File

@ -22,7 +22,7 @@
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2> <h2><i class="fa fa-bar-chart"></i> Players Online</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="playersOnline" style="width: 100%; height: 500px;"></div> <div id="playersOnline" style="width: 100%; height: 500px;"></div>
@ -30,7 +30,7 @@
</div> </div>
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2> <h2><i class="fa fa-info-circle"></i> Information</h2>
</div> </div>
<div class="box" style="height: 75%;"> <div class="box" style="height: 75%;">
<p>${playersOnline}/${playersMax} Players Online</p> <p>${playersOnline}/${playersMax} Players Online</p>
@ -45,15 +45,15 @@
<script> <script>
var playersOnlineSeries = { var playersOnlineSeries = {
name: 'Players Online', name: 'Players Online',
data: %playersonlineseries%, data: ${playersonlineseries},
type: 'areaspline', type: 'areaspline',
color: '#%playersgraphcolor%', color: '#${playersgraphcolor}',
tooltip: { tooltip: {
valueDecimals: 0 valueDecimals: 0
} }
}; };
/*playersChart('playerChart', playersOnlineSeries, 3);*/
//playersChart('playerChart', playersOnlineSeries, 3);
</script> </script>
</body> </body>
</html> </html>

View File

@ -72,7 +72,7 @@
</div> </div>
<div class="box-footer scrollbar" style="padding: 2px;"> <div class="box-footer scrollbar" style="padding: 2px;">
<div class="row"> <div class="row">
<div class="column" style="padding: 5px 0px 5px 10px;"><p>Times Kicked: ${kickCount}<br> <div class="column" style="padding: 5px 0 5px 10px;"><p>Times Kicked: ${kickCount}<br>
</p></div> </p></div>
<div class="column"><img style="padding: 10px 100px; height: 100px; width: 100px;" <div class="column"><img style="padding: 10px 100px; height: 100px; width: 100px;"
src="https://cravatar.eu/avatar/${playerName}/100"></div> src="https://cravatar.eu/avatar/${playerName}/100"></div>
@ -192,7 +192,7 @@
x.style.transform = "translate3d(0px,0px,0)"; x.style.transform = "translate3d(0px,0px,0)";
x.style.width = "" + navButtons.length * 100 + "%"; x.style.width = "" + navButtons.length * 100 + "%";
for (var i = 0; i < navButtons.length; i++) { for (var i = 0; i < navButtons.length; i++) {
navButtons[i].onclick = openFunc(i) navButtons[i].onclick = openFunc(i);
tabs[i].style.width = "" + 100 / navButtons.length + "%"; tabs[i].style.width = "" + 100 / navButtons.length + "%";
} }
x.style.opacity = "1"; x.style.opacity = "1";
@ -210,12 +210,16 @@
navButtons[j].classList.remove('active'); navButtons[j].classList.remove('active');
} }
} }
var perc = - 100 / navButtons.length; var percent = - 100 / navButtons.length;
slideIndex = i; slideIndex = i;
if (slideIndex > max) {slideIndex = 0}; if (slideIndex > max) {
if (slideIndex < 0) {slideIndex = max}; slideIndex = 0;
}
if (slideIndex < 0) {
slideIndex = max;
}
window.sessionStorage.setItem("InspectSlideIndex", slideIndex); window.sessionStorage.setItem("InspectSlideIndex", slideIndex);
var value = slideIndex * perc; var value = slideIndex * percent;
x.style.transition = "0.5s"; x.style.transition = "0.5s";
x.style.transform = "translate3d(" + value + "%,0px,0)"; x.style.transform = "translate3d(" + value + "%,0px,0)";
}; };

View File

@ -21,28 +21,28 @@
<div class="content-server"> <div class="content-server">
<div class="nav-bar row"> <div class="nav-bar row">
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-info-circle" aria-hidden="true"></i> Information <i class="fa fa-info-circle"></i> Information
</a> </a>
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-bar-chart" aria-hidden="true"></i> Online Activity <i class="fa fa-bar-chart"></i> Online Activity
</a> </a>
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-calendar" aria-hidden="true"></i> Sessions <i class="fa fa-calendar"></i> Sessions
</a> </a>
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cogs" aria-hidden="true"></i> Performance <i class="fa fa-cogs"></i> Performance
</a> </a>
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-list-alt" aria-hidden="true"></i> Playerlist <i class="fa fa-list-alt"></i> Playerlist
</a> </a>
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-terminal" aria-hidden="true"></i> Command usage <i class="fa fa-terminal"></i> Command usage
</a> </a>
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-globe" aria-hidden="true"></i> Demographics <i class="fa fa-globe"></i> Demographics
</a> </a>
<a href="javascript:void(0)" class="nav-button"> <a href="javascript:void(0)" class="nav-button">
<i class="fa fa-cubes" aria-hidden="true"></i> Plugins <i class="fa fa-cubes"></i> Plugins
</a> </a>
</div> </div>
<div id="limiter" class="main-limiter"> <div id="limiter" class="main-limiter">
@ -51,7 +51,7 @@
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2> <h2><i class="fa fa-bar-chart"></i> Players Online</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="playersOnlineDay" style="width: 100%; height: 700px;"></div> <div id="playersOnlineDay" style="width: 100%; height: 700px;"></div>
@ -59,7 +59,7 @@
</div> </div>
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-info-circle" aria-hidden="true"></i> Information</h2> <h2><i class="fa fa-info-circle"></i> Information</h2>
</div> </div>
<div class="box" style="margin-bottom: 5px;"> <div class="box" style="margin-bottom: 5px;">
<div class="row"> <div class="row">
@ -91,7 +91,7 @@
</div> </div>
</div> </div>
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Recent Logins</h2> <h2><i class="fa fa-calendar-check-o"></i> Recent Logins</h2>
</div> </div>
<div class="box-footer" style="padding: 2px;"> <div class="box-footer" style="padding: 2px;">
<table> <table>
@ -113,7 +113,7 @@
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Players Online</h2> <h2><i class="fa fa-bar-chart"></i> Players Online</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="playersOnlineMonth" style="width: 100%; height: 700px;"></div> <div id="playersOnlineMonth" style="width: 100%; height: 700px;"></div>
@ -121,7 +121,7 @@
</div> </div>
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-braille" aria-hidden="true"></i> Player Join PunchCard</h2> <h2><i class="fa fa-braille"></i> Player Join PunchCard</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="punchcard" style="width: 100%; height: 700px;"></div> <div id="punchcard" style="width: 100%; height: 700px;"></div>
@ -168,7 +168,7 @@
<div class="row" style="flex-grow: 2; width: 140%;"> <div class="row" style="flex-grow: 2; width: 140%;">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-calendar" aria-hidden="true"></i> 50 Most Recent Sessions</h2> <h2><i class="fa fa-calendar"></i> 50 Most Recent Sessions</h2>
</div> </div>
<div class="box-footer scrollbar" style="padding: 2px;"> <div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table"> <table class="sortable table">
@ -190,13 +190,13 @@
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> World Playtime</h2> <h2><i class="fa fa-pie-chart"></i> World Playtime</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="worldPie" style="width: 100%; height: 450px;"></div> <div id="worldPie" style="width: 100%; height: 450px;"></div>
</div> </div>
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-pie-chart" aria-hidden="true"></i> Playerbase</h2> <h2><i class="fa fa-pie-chart"></i> Playerbase</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="activityPie" style="width: 100%; height: 450px;"></div> <div id="activityPie" style="width: 100%; height: 450px;"></div>
@ -209,7 +209,7 @@
<div class="row"> <!--First row (horizontal)--> <div class="row"> <!--First row (horizontal)-->
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Ticks Per Second</h2> <h2><i class="fa fa-bar-chart"></i> Ticks Per Second</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="tpsGraph" style="width: 100%; height: 700px;"></div> <div id="tpsGraph" style="width: 100%; height: 700px;"></div>
@ -217,7 +217,7 @@
</div> </div>
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> Resource Usage</h2> <h2><i class="fa fa-bar-chart"></i> Resource Usage</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="resourceGraph" style="width: 100%; height: 700px;"></div> <div id="resourceGraph" style="width: 100%; height: 700px;"></div>
@ -227,7 +227,7 @@
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-bar-chart" aria-hidden="true"></i> World Load</h2> <h2><i class="fa fa-bar-chart"></i> World Load</h2>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<div id="worldGraph" style="width: 100%; height: 700px;"></div> <div id="worldGraph" style="width: 100%; height: 700px;"></div>
@ -236,7 +236,7 @@
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-cogs" aria-hidden="true"></i> Last 24 Hours</h2> <h2><i class="fa fa-cogs"></i> Last 24 Hours</h2>
</div> </div>
<div class="box"> <div class="box">
<p><b>Averages:</b></p> <p><b>Averages:</b></p>
@ -251,7 +251,7 @@
</div> </div>
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-cogs" aria-hidden="true"></i> Last 7 Days</h2> <h2><i class="fa fa-cogs"></i> Last 7 Days</h2>
</div> </div>
<div class="box"> <div class="box">
<p><b>Averages:</b></p> <p><b>Averages:</b></p>
@ -271,19 +271,19 @@
<div id="tab-playerlist" class="tab"> <div id="tab-playerlist" class="tab">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-list" aria-hidden="true"></i> Playerlist</h2> <h2><i class="fa fa-list"></i> Playerlist</h2>
</div> </div>
<div class="box-footer scrollbar" style="padding: 2px;"> <div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table"> <table class="sortable table">
<thead> <thead>
<tr> <tr>
<th><i class="fa fa-user" aria-hidden="true"></i> Player</th> <th><i class="fa fa-user"></i> Player</th>
<th><i class="fa fa-check" aria-hidden="true"></i> Active</th> <th><i class="fa fa-check"></i> Active</th>
<th><i class="fa fa-clock-o" aria-hidden="true"></i> Playtime</th> <th><i class="fa fa-clock-o"></i> Playtime</th>
<th><i class="fa fa-calendar-plus-o" aria-hidden="true"></i> Login times</th> <th><i class="fa fa-calendar-plus-o"></i> Login times</th>
<th><i class="fa fa-user-plus" aria-hidden="true"></i> Registered</th> <th><i class="fa fa-user-plus"></i> Registered</th>
<th><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Last seen</th> <th><i class="fa fa-calendar-check-o"></i> Last seen</th>
<th><i class="fa fa-globe" aria-hidden="true"></i> Geolocation</th> <th><i class="fa fa-globe"></i> Geolocation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -296,14 +296,14 @@
<div id="tab-command-usage" class="tab"> <div id="tab-command-usage" class="tab">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-terminal" aria-hidden="true"></i> Command Usage</h2> <h2><i class="fa fa-terminal"></i> Command Usage</h2>
</div> </div>
<div class="box-footer scrollbar" style="padding: 2px;"> <div class="box-footer scrollbar" style="padding: 2px;">
<table class="sortable table"> <table class="sortable table">
<thead> <thead>
<tr> <tr>
<th><i class="fa fa-chevron-right" aria-hidden="true"></i> Command</th> <th><i class="fa fa-chevron-right"></i> Command</th>
<th><i class="fa fa-list-ol" aria-hidden="true"></i> Times used</th> <th><i class="fa fa-list-ol"></i> Times used</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -316,7 +316,7 @@
<div id="tab-demographics" class="tab"> <div id="tab-demographics" class="tab">
<div class="column"> <div class="column">
<div class="box-header"> <div class="box-header">
<h2><i class="fa fa-globe" aria-hidden="true"></i> Geolocations</h2> <h2><i class="fa fa-globe"></i> Geolocations</h2>
</div> </div>
<div class="box-footer" style="padding: 2px;"> <div class="box-footer" style="padding: 2px;">
<div id="choropleth" style="width: 100%; height: 700px;"></div> <div id="choropleth" style="width: 100%; height: 700px;"></div>
@ -489,7 +489,7 @@
x.style.transform = "translate3d(0px,0px,0)"; x.style.transform = "translate3d(0px,0px,0)";
x.style.width = "" + navButtons.length * 100 + "%"; x.style.width = "" + navButtons.length * 100 + "%";
for (var i = 0; i < navButtons.length; i++) { for (var i = 0; i < navButtons.length; i++) {
navButtons[i].onclick = openFunc(i) navButtons[i].onclick = openFunc(i);
tabs[i].style.width = "" + 100 / navButtons.length + "%"; tabs[i].style.width = "" + 100 / navButtons.length + "%";
} }
x.style.opacity = "1"; x.style.opacity = "1";
@ -519,12 +519,16 @@
navButtons[j].classList.remove('active'); navButtons[j].classList.remove('active');
} }
} }
var perc = - 100 / navButtons.length; var percent = - 100 / navButtons.length;
slideIndex = i; slideIndex = i;
if (slideIndex > max) {slideIndex = 0}; if (slideIndex > max) {
if (slideIndex < 0) {slideIndex = max}; slideIndex = 0
}
if (slideIndex < 0) {
slideIndex = max
}
window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex); window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex);
var value = slideIndex * perc; var value = slideIndex * percent;
x.style.transition = "0.5s"; x.style.transition = "0.5s";
x.style.transform = "translate3d(" + value + "%,0px,0)"; x.style.transform = "translate3d(" + value + "%,0px,0)";
}; };

View File

@ -1,5 +1,5 @@
function activityPie(id, activitySeries, activityTotal, activityColors) { function activityPie(id, activitySeries, activityTotal, activityColors) {
var myChart = Highcharts.chart(id, { Highcharts.chart(id, {
chart: { chart: {
plotBackgroundColor: null, plotBackgroundColor: null,
plotBorderWidth: null, plotBorderWidth: null,

View File

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

View File

@ -11,7 +11,7 @@ function punchCard(id, punchcardSeries) {
tickInterval: 3600000 tickInterval: 3600000
}, },
yAxis: { yAxis: {
categories: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'], categories: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']
}, },
tooltip: { tooltip: {
pointFormat: 'Activity: {point.z}' pointFormat: 'Activity: {point.z}'

View File

@ -1,5 +1,5 @@
function resourceChart(id, cpuSeries, ramSeries) { function resourceChart(id, cpuSeries, ramSeries) {
var myChart = Highcharts.stockChart(id, { Highcharts.stockChart(id, {
rangeSelector: { rangeSelector: {
selected: 1, selected: 1,
buttons: [{ buttons: [{

View File

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

View File

@ -1,5 +1,5 @@
function tpsChart(id, tpsSeries, playersOnlineSeries) { function tpsChart(id, tpsSeries, playersOnlineSeries) {
var myChart = Highcharts.stockChart(id, { Highcharts.stockChart(id, {
rangeSelector: { rangeSelector: {
selected: 1, selected: 1,
buttons: [{ buttons: [{
@ -31,7 +31,7 @@ function tpsChart(id, tpsSeries, playersOnlineSeries) {
title: { title: {
text: 'Players' text: 'Players'
}, },
height: '30%', height: '30%'
}, { }, {
lineWidth: 2, lineWidth: 2,
labels: { labels: {
@ -43,8 +43,7 @@ function tpsChart(id, tpsSeries, playersOnlineSeries) {
}, },
height: '70%', height: '70%',
top: '30%', top: '30%',
offset: 0, offset: 0
lineWidth: 2
}], }],
tooltip: { tooltip: {
split: true split: true

View File

@ -1,5 +1,5 @@
function worldChart(id, entitySeries, chunkSeries) { function worldChart(id, entitySeries, chunkSeries) {
var myChart = Highcharts.stockChart(id, { Highcharts.stockChart(id, {
rangeSelector: { rangeSelector: {
selected: 1, selected: 1,
buttons: [{ buttons: [{

View File

@ -1,5 +1,5 @@
function worldMap(id, colorMin, colorMax, mapSeries) { function worldMap(id, colorMin, colorMax, mapSeries) {
var myChart = Highcharts.mapChart(id, { Highcharts.mapChart(id, {
chart: { chart: {
animation: true animation: true
}, },

View File

@ -1,5 +1,5 @@
function worldPie(id, worldSeries, worldTotal) { function worldPie(id, worldSeries, worldTotal) {
var myChart = Highcharts.chart(id, { Highcharts.chart(id, {
chart: { chart: {
plotBackgroundColor: null, plotBackgroundColor: null,
plotBorderWidth: null, plotBorderWidth: null,

View File

@ -95,7 +95,7 @@ Html - OP || , Operator (Op)
Html - Table No Kills || Keine Kills Html - Table No Kills || Keine Kills
Manage FAIL - Confirm Action || §c[Plan] Füge -a hinzu um den Befehl zu bestätigen! ${0} Manage FAIL - Confirm Action || §c[Plan] Füge -a hinzu um den Befehl zu bestätigen! ${0}
Manage FAIL - Faulty DB Connection || §c[Plan] Eine der Datenbanken wurde nicht richtig initialisiert. Manage FAIL - Faulty DB Connection || §c[Plan] Eine der Datenbanken wurde nicht richtig initialisiert.
Manage FAIL - Backup File Not Found || §c[Plan] Sicherheitskopie existiert nicht! Manage FAIL - Backup File Not Found || §c[Plan] Es existiert keine Sicherheitskopie!
Manage FAIL - Incorrect DB || §c[Plan] Falsche Datenbank! (SQlite/MySQL wird unterstützt): Manage FAIL - Incorrect DB || §c[Plan] Falsche Datenbank! (SQlite/MySQL wird unterstützt):
Manage FAIL - Incorrect Plugin || §c[Plan] Plugin nicht unterstützt: Manage FAIL - Incorrect Plugin || §c[Plan] Plugin nicht unterstützt:
Manage FAIL - Empty DB || §c[Plan] Datenbank hat keine Spieler Daten! Manage FAIL - Empty DB || §c[Plan] Datenbank hat keine Spieler Daten!
@ -114,4 +114,4 @@ Manage NOTIFY - Overwrite || Daten in ${0}-Datenbank werden übe
Manage NOTIFY - Partial Overwrite || Einige Daten in ${0}-Datenbank werden überschrieben! Manage NOTIFY - Partial Overwrite || Einige Daten in ${0}-Datenbank werden überschrieben!
Manage NOTIFY - Remove || Daten in ${0}-Datenbank werden entfernt! Manage NOTIFY - Remove || Daten in ${0}-Datenbank werden entfernt!
Manage NOTIFY - Rewrite || Daten in ${0}-Datenbank werden neu geschrieben! Manage NOTIFY - Rewrite || Daten in ${0}-Datenbank werden neu geschrieben!
WARN - Too Small Queue Size || Warteschlagengröße ist zu klein! (${0}), änder diese Einstellung zu einer höheren! (Derzeit ${1}) WARN - Too Small Queue Size || Die Warteschlagengröße ist zu klein! (${0}), änder' diese Einstellung zu einer höheren! (Derzeit ${1})

View File

@ -42,11 +42,11 @@
} }
.yellow { .yellow {
color: #FFFF55; color: #FFFF55;
text-shadow: 0px 0px 6px #000; text-shadow: 0 0 6px #000;
} }
.white { .white {
color: #FFFFFF; color: #FFFFFF;
text-shadow: 0px 0px 8px #000; text-shadow: 0 0 8px #000;
} }
body { body {
@ -68,15 +68,15 @@ header {
header h1 { header h1 {
font-weight: 500; font-weight: 500;
font-size: 55px; font-size: 55px;
margin-top: 0px; margin-top: 0;
margin-bottom: 0px; margin-bottom: 0;
margin-left: 10px; margin-left: 10px;
} }
header p { header p {
font-weight: 400; font-weight: 400;
} }
header div { header div {
padding: 5pxpx 20px; padding: 5px 20px;
} }
.right { .right {
@ -126,14 +126,14 @@ header div {
background-color: #5da341; background-color: #5da341;
padding: 5px 20px; padding: 5px 20px;
text-align: left; text-align: left;
margin: 5px 5px 0px 5px; margin: 5px 5px 0 5px;
} }
.box { .box {
background-color: #fff; background-color: #fff;
padding: 5px 20px; padding: 5px 20px;
color: #000; color: #000;
text-align: left; text-align: left;
margin: 0px 5px; margin: 0 5px;
} }
.box-footer { .box-footer {
vertical-align: middle; vertical-align: middle;
@ -234,10 +234,10 @@ tr:nth-child(odd) {background: #eee}
} }
.session-header h3 { .session-header h3 {
margin: 0px; margin: 0;
} }
.session-header p { .session-header p {
margin: 0px; margin: 0;
} }
.session { .session {
@ -249,14 +249,14 @@ tr:nth-child(odd) {background: #eee}
margin: 1px 3px; margin: 1px 3px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 0px; padding: 0;
} }
.session-col { .session-col {
width: 100%; width: 100%;
background: #fff; background: #fff;
color: #000; color: #000;
margin: 0px 2px; margin: 0 2px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 10px 20px; padding: 10px 20px;
@ -272,10 +272,10 @@ tr:nth-child(odd) {background: #eee}
display: none; display: none;
} }
.plugins-header h2 { .plugins-header h2 {
margin: 0px; margin: 0;
} }
.plugins-header p { .plugins-header p {
margin: 0px; margin: 0;
} }
@media only screen and (max-width: 1680px) { @media only screen and (max-width: 1680px) {
@ -290,14 +290,14 @@ tr:nth-child(odd) {background: #eee}
} }
.content { .content {
margin-top: 100px; margin-top: 100px;
margin-left: 0%; margin-left: 0;
margin-right: 0%; margin-right: 0;
width: 100%; width: 100%;
} }
.content-server { .content-server {
margin-top: 100px; margin-top: 100px;
margin-left: 0%; margin-left: 0;
margin-right: 0%; margin-right: 0;
width: 100%; width: 100%;
} }
.nav-bar { .nav-bar {

View File

@ -7,8 +7,6 @@ package test.java.main.java.com.djrapitops.plan.database;
import main.java.com.djrapitops.plan.database.Container; import main.java.com.djrapitops.plan.database.Container;
import main.java.com.djrapitops.plan.database.DBUtils; import main.java.com.djrapitops.plan.database.DBUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import java.util.ArrayList; import java.util.ArrayList;
@ -23,17 +21,6 @@ import static org.junit.Assert.assertEquals;
*/ */
public class DBUtilsTest { public class DBUtilsTest {
public DBUtilsTest() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test @Test
public void testSplitIntoBatches() { public void testSplitIntoBatches() {
List<Integer> list = new ArrayList<>(); List<Integer> list = new ArrayList<>();

View File

@ -89,7 +89,7 @@ public class TestInit {
// Html Files // Html Files
File analysis = new File(getClass().getResource("/server.html").getPath()); File analysis = new File(getClass().getResource("/server.html").getPath());
when(planMock.getResource("analysis.html")).thenReturn(new FileInputStream(analysis)); when(planMock.getResource("server.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));