mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-05 10:20:23 +01:00
Fixes to PluginData parsing
This commit is contained in:
parent
91c2a3850a
commit
b897e3ac29
@ -87,7 +87,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.djrapitops</groupId>
|
<groupId>com.djrapitops</groupId>
|
||||||
<artifactId>PlanPluginBridge</artifactId>
|
<artifactId>PlanPluginBridge</artifactId>
|
||||||
<version>4.0.5</version>
|
<version>4.1.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Testing -->
|
<!-- Testing -->
|
||||||
|
@ -49,11 +49,14 @@ public class InspectContainer {
|
|||||||
|
|
||||||
public final String parseHtml() {
|
public final String parseHtml() {
|
||||||
StringBuilder html = new StringBuilder();
|
StringBuilder html = new StringBuilder();
|
||||||
|
html.append("<div class=\"body\">");
|
||||||
|
|
||||||
for (Map.Entry<String, String> entry : values.entrySet()) {
|
for (Map.Entry<String, String> entry : values.entrySet()) {
|
||||||
html.append("<p>").append(entry.getKey()).append(": ").append(entry.getValue()).append("</p>");
|
html.append("<p>").append(entry.getKey()).append(": ").append(entry.getValue()).append("</p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html.append("</div>");
|
||||||
|
|
||||||
for (Map.Entry<String, String> entry : this.html.entrySet()) {
|
for (Map.Entry<String, String> entry : this.html.entrySet()) {
|
||||||
html.append(entry.getValue());
|
html.append(entry.getValue());
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ public final class TableContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String parseHtml() {
|
public String parseHtml() {
|
||||||
return Html.TABLE_COLORED.parse(color != null ? color : "") +
|
return Html.TABLE.parse() +
|
||||||
parseHeader() +
|
parseHeader() +
|
||||||
parseBody() +
|
parseBody() +
|
||||||
"</table>";
|
"</table>";
|
||||||
@ -49,6 +49,7 @@ public final class TableContainer {
|
|||||||
addRow("No Data");
|
addRow("No Data");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.append("<tbody>");
|
||||||
for (Serializable[] row : values) {
|
for (Serializable[] row : values) {
|
||||||
int maxIndex = row.length - 1;
|
int maxIndex = row.length - 1;
|
||||||
body.append("<tr>");
|
body.append("<tr>");
|
||||||
@ -63,6 +64,7 @@ public final class TableContainer {
|
|||||||
}
|
}
|
||||||
body.append("</tr>");
|
body.append("</tr>");
|
||||||
}
|
}
|
||||||
|
body.append("</tbody>");
|
||||||
|
|
||||||
return Html.TABLE_BODY.parse(body.toString());
|
return Html.TABLE_BODY.parse(body.toString());
|
||||||
}
|
}
|
||||||
@ -72,11 +74,11 @@ public final class TableContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String parseHeader() {
|
public String parseHeader() {
|
||||||
StringBuilder header = new StringBuilder("<tr>");
|
StringBuilder header = new StringBuilder("<thead" + (color != null ? " bg-" + color : "") + "><tr>");
|
||||||
for (String title : this.header) {
|
for (String title : this.header) {
|
||||||
header.append("<th>").append(title).append("</th>");
|
header.append("<th>").append(title).append("</th>");
|
||||||
}
|
}
|
||||||
header.append("</tr>");
|
header.append("</tr></thead>");
|
||||||
return Html.TABLE_HEAD.parse(header.toString());
|
return Html.TABLE_HEAD.parse(header.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -111,8 +111,8 @@ public class AnalysisPluginsTabContentCreator {
|
|||||||
"<div class=\"header\">" +
|
"<div class=\"header\">" +
|
||||||
"<h2>")
|
"<h2>")
|
||||||
.append(pluginData.parsePluginIcon()).append(" ").append(pluginData.getSourcePlugin())
|
.append(pluginData.parsePluginIcon()).append(" ").append(pluginData.getSourcePlugin())
|
||||||
.append("</h2></div>").append("<div class=\"body\">")
|
.append("</h2></div>")
|
||||||
.append(container.parseHtml())
|
.append(container.parseHtml())
|
||||||
.append("</div></div></div></div></div>");
|
.append("</div></div></div></div>");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,7 +9,6 @@ import com.djrapitops.pluginbridge.plan.griefprevention.GriefPreventionHook;
|
|||||||
import com.djrapitops.pluginbridge.plan.jobs.JobsHook;
|
import com.djrapitops.pluginbridge.plan.jobs.JobsHook;
|
||||||
import com.djrapitops.pluginbridge.plan.litebans.LiteBansHook;
|
import com.djrapitops.pluginbridge.plan.litebans.LiteBansHook;
|
||||||
import com.djrapitops.pluginbridge.plan.mcmmo.McmmoHook;
|
import com.djrapitops.pluginbridge.plan.mcmmo.McmmoHook;
|
||||||
import com.djrapitops.pluginbridge.plan.ontime.OnTimeHook;
|
|
||||||
import com.djrapitops.pluginbridge.plan.superbvote.SuperbVoteHook;
|
import com.djrapitops.pluginbridge.plan.superbvote.SuperbVoteHook;
|
||||||
import com.djrapitops.pluginbridge.plan.towny.TownyHook;
|
import com.djrapitops.pluginbridge.plan.towny.TownyHook;
|
||||||
import com.djrapitops.pluginbridge.plan.vault.VaultHook;
|
import com.djrapitops.pluginbridge.plan.vault.VaultHook;
|
||||||
@ -26,7 +25,6 @@ import main.java.com.djrapitops.plan.data.additional.HookHandler;
|
|||||||
* @see JobsHook
|
* @see JobsHook
|
||||||
* @see LiteBansHook
|
* @see LiteBansHook
|
||||||
* @see McmmoHook
|
* @see McmmoHook
|
||||||
* @see OnTimeHook
|
|
||||||
* @see SuperbVoteHook
|
* @see SuperbVoteHook
|
||||||
* @see TownyHook
|
* @see TownyHook
|
||||||
* @see VaultHook
|
* @see VaultHook
|
||||||
@ -49,7 +47,6 @@ public class Bridge {
|
|||||||
new JobsHook(h),
|
new JobsHook(h),
|
||||||
new LiteBansHook(h),
|
new LiteBansHook(h),
|
||||||
new McmmoHook(h),
|
new McmmoHook(h),
|
||||||
new OnTimeHook(h),
|
|
||||||
new SuperbVoteHook(h),
|
new SuperbVoteHook(h),
|
||||||
new TownyHook(h),
|
new TownyHook(h),
|
||||||
new VaultHook(h),
|
new VaultHook(h),
|
||||||
|
Loading…
Reference in New Issue
Block a user