Added replacement values for ${refresh} #320

This commit is contained in:
Rsl1122 2017-10-08 13:28:08 +03:00
parent 984f982a35
commit ec602a8b6a
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import main.java.com.djrapitops.plan.Settings;
import main.java.com.djrapitops.plan.api.IPlan; import main.java.com.djrapitops.plan.api.IPlan;
import main.java.com.djrapitops.plan.api.exceptions.ParseException; import main.java.com.djrapitops.plan.api.exceptions.ParseException;
import main.java.com.djrapitops.plan.data.AnalysisData; import main.java.com.djrapitops.plan.data.AnalysisData;
import main.java.com.djrapitops.plan.utilities.FormatUtils;
import main.java.com.djrapitops.plan.utilities.MiscUtils; import main.java.com.djrapitops.plan.utilities.MiscUtils;
import main.java.com.djrapitops.plan.utilities.file.FileUtil; import main.java.com.djrapitops.plan.utilities.file.FileUtil;
import main.java.com.djrapitops.plan.utilities.html.HtmlUtils; import main.java.com.djrapitops.plan.utilities.html.HtmlUtils;
@ -37,6 +38,7 @@ public class AnalysisPageParser extends PageParser {
addValue("tabContentPlugins", data.replacePluginsTabLayout()); addValue("tabContentPlugins", data.replacePluginsTabLayout());
addValue("serverName", Settings.SERVER_NAME.toString()); addValue("serverName", Settings.SERVER_NAME.toString());
addValue("timeZone", MiscUtils.getTimeZoneOffsetHours()); addValue("timeZone", MiscUtils.getTimeZoneOffsetHours());
addValue("refresh", FormatUtils.formatTimeStamp(data.getRefreshDate()));
addValue("playersMax", plugin.getVariable().getMaxPlayers()); addValue("playersMax", plugin.getVariable().getMaxPlayers());
addValue("playersOnline", getPlayersOnline()); addValue("playersOnline", getPlayersOnline());

View File

@ -107,6 +107,9 @@ public class InspectPageParser extends PageParser {
addValue("contentServerOverview", HtmlStructure.createServerOverviewColumn(sessions)); addValue("contentServerOverview", HtmlStructure.createServerOverviewColumn(sessions));
long now = MiscUtils.getTime(); long now = MiscUtils.getTime();
addValue("refresh", FormatUtils.formatTimeStamp(now));
long dayAgo = now - TimeAmount.DAY.ms(); long dayAgo = now - TimeAmount.DAY.ms();
long weekAgo = now - TimeAmount.WEEK.ms(); long weekAgo = now - TimeAmount.WEEK.ms();