mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 00:51:25 +01:00
Fixed some funky stuff with plugin data accordions
This commit is contained in:
parent
ec3d2eba02
commit
b012b09469
@ -64,12 +64,12 @@ public class FactionAccordionCreator {
|
||||
long playerKills = ServerProfile.getPlayerKills(sessions).size();
|
||||
long deaths = ServerProfile.getDeathCount(sessions);
|
||||
|
||||
String separated = HtmlStructure.separateWithDots(powerString, leaderName);
|
||||
String separated = HtmlStructure.separateWithDots(("Power: " + powerString), leaderName);
|
||||
|
||||
String htmlID = "faction_" + createdAtMillis;
|
||||
|
||||
// Accordion panel header
|
||||
html.append("<div class=\"panel panel-col-light-green\">")
|
||||
html.append("<div class=\"panel panel-col-deep-purple\">")
|
||||
.append("<div class=\"panel-heading\" role=\"tab\" id=\"heading_").append(htmlID).append("\">")
|
||||
.append("<h4 class=\"panel-title\">")
|
||||
.append("<a class=\"collapsed\" role=\"button\" data-toggle=\"collapse\" data-parent=\"#session_accordion\" ")
|
||||
|
@ -52,7 +52,7 @@ public class KingdomAccordionCreator {
|
||||
long mobKills = ServerProfile.getMobKillCount(sessions);
|
||||
long deaths = ServerProfile.getDeathCount(sessions);
|
||||
|
||||
String separated = HtmlStructure.separateWithDots(String.valueOf(residentsNum), kingName);
|
||||
String separated = HtmlStructure.separateWithDots(("Members: " + residentsNum), kingName);
|
||||
|
||||
String htmlID = "kingdom_" + kingdomName.replace(" ", "-");
|
||||
|
||||
@ -71,10 +71,12 @@ public class KingdomAccordionCreator {
|
||||
html.append("<div id=\"session_").append(htmlID).append("\" class=\"panel-collapse collapse\" role=\"tabpanel\"")
|
||||
.append(" aria-labelledby=\"heading_").append(htmlID).append("\">")
|
||||
.append("<div class=\"panel-body\"><div class=\"row clearfix\">")
|
||||
.append("<div class=\"col-xs-12 col-sm-6 col-md-6 col-lg-6\">") // Left col-6
|
||||
// Lore
|
||||
.append("<p>").append(kingdomLore).append("</p>")
|
||||
.append("<p><i class=\"col-amber fa fa-user\"></i> Mayor <span class=\"pull-right\">").append(kingName).append("</span></p>")
|
||||
.append("<div class=\"col-xs-12 col-sm-6 col-md-6 col-lg-6\">"); // Left col-6
|
||||
// Lore
|
||||
if (kingdomLore != null) {
|
||||
html.append("<p>").append(kingdomLore).append("</p>");
|
||||
}
|
||||
html.append("<p><i class=\"col-amber fa fa-user\"></i> Mayor <span class=\"pull-right\">").append(kingName).append("</span></p>")
|
||||
// Playtime
|
||||
.append("<p><i class=\"col-amber fa fa-users\"></i> Members<span class=\"pull-right\"><b>").append(residentsNum).append("</b></span></p>")
|
||||
.append("<p><i class=\"col-amber fa fa-bolt\"></i> Might<span class=\"pull-right\"><b>").append(might).append("</b></span></p>")
|
||||
|
@ -56,7 +56,7 @@ public class KingdomsData extends PluginData {
|
||||
public AnalysisContainer getServerData(Collection<UUID> collection, AnalysisContainer analysisContainer) throws Exception {
|
||||
Map<String, OfflineKingdom> kingdoms = GameManagement.getKingdomManager().getKingdomList();
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Kingdoms", "shield", "amber"), kingdoms.size());
|
||||
analysisContainer.addValue(getWithIcon("Number of Kingdoms", "shield", "amber"), kingdoms.size());
|
||||
|
||||
if (!kingdoms.isEmpty()) {
|
||||
analysisContainer.addHtml("kingdomsAccordion", KingdomAccordionCreator.createAccordion(kingdoms));
|
||||
|
@ -66,7 +66,7 @@ public class TownAccordionCreator {
|
||||
long mobKills = ServerProfile.getMobKillCount(sessions);
|
||||
long deaths = ServerProfile.getDeathCount(sessions);
|
||||
|
||||
String separated = HtmlStructure.separateWithDots(String.valueOf(residentsNum), mayorName);
|
||||
String separated = HtmlStructure.separateWithDots(("Residents: " + residentsNum), mayorName);
|
||||
|
||||
String htmlID = "town_" + townName.replace(" ", "-");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user