mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-11 19:02:16 +01:00
Fixed disabled Analysis button
This commit is contained in:
parent
0898102603
commit
97ceddecb5
@ -409,7 +409,6 @@ public class HtmlStructure {
|
||||
int online = plugin.getServer().getOnlinePlayers().size();
|
||||
Optional<Long> analysisRefreshDate = ((BukkitInformationManager) plugin.getInfoManager()).getAnalysisRefreshDate();
|
||||
String refresh = analysisRefreshDate.map(FormatUtils::formatTimeStamp).orElse("-");
|
||||
boolean analysisIsAvailable = analysisRefreshDate.isPresent();
|
||||
|
||||
String serverName = plugin.getServerInfoManager().getServerName();
|
||||
String address = "../server/" + serverName;
|
||||
@ -427,14 +426,9 @@ public class HtmlStructure {
|
||||
|
||||
// Footer
|
||||
b.append("<div class=\"box-footer\"><p>Last Refresh: ").append(refresh).append("</p>");
|
||||
if (analysisIsAvailable) {
|
||||
b.append("<a href=\"").append(address).append("\" class=\"button right\">Analysis</a>");
|
||||
} else {
|
||||
b.append("<a class=\"button disabled right\">Analysis</a>");
|
||||
}
|
||||
b.append("<a href=\"").append(address).append("\" class=\"button right\">Analysis</a>");
|
||||
|
||||
b.append("</div>")
|
||||
.append("</div>");
|
||||
b.append("</div>").append("</div>");
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user