Changed player page session average to median

Affects issues:
- Close #1234
This commit is contained in:
Risto Lahtela 2020-05-03 18:49:20 +03:00
parent a44c711ed8
commit 4fc565913c
3 changed files with 6 additions and 4 deletions

View File

@ -138,6 +138,7 @@ public class PlayerJSONCreator {
onlineActivity.put("active_playtime_30d", timeAmount.apply(sessions30d.toActivePlaytime()));
onlineActivity.put("afk_time_30d", timeAmount.apply(sessions30d.toAfkTime()));
onlineActivity.put("average_session_length_30d", timeAmount.apply(sessions30d.toAverageSessionLength()));
onlineActivity.put("median_session_length_30d", timeAmount.apply(sessions30d.toMedianSessionLength()));
onlineActivity.put("session_count_30d", sessions30d.count());
onlineActivity.put("player_kill_count_30d", sessions30d.toPlayerKillCount());
onlineActivity.put("mob_kill_count_30d", sessions30d.toMobKillCount());
@ -147,6 +148,7 @@ public class PlayerJSONCreator {
onlineActivity.put("active_playtime_7d", timeAmount.apply(sessions7d.toActivePlaytime()));
onlineActivity.put("afk_time_7d", timeAmount.apply(sessions7d.toAfkTime()));
onlineActivity.put("average_session_length_7d", timeAmount.apply(sessions7d.toAverageSessionLength()));
onlineActivity.put("median_session_length_7d", timeAmount.apply(sessions7d.toMedianSessionLength()));
onlineActivity.put("session_count_7d", sessions7d.count());
onlineActivity.put("player_kill_count_7d", sessions7d.toPlayerKillCount());
onlineActivity.put("mob_kill_count_7d", sessions7d.toMobKillCount());

View File

@ -51,8 +51,8 @@ function loadPlayerOverviewValues(json, error) {
$(element).find("#data_active_playtime_7d").text(data.active_playtime_7d);
$(element).find("#data_afk_time_30d").text(data.afk_time_30d);
$(element).find("#data_afk_time_7d").text(data.afk_time_7d);
$(element).find("#data_average_session_length_30d").text(data.average_session_length_30d);
$(element).find("#data_average_session_length_7d").text(data.average_session_length_7d);
$(element).find("#data_median_session_length_30d").text(data.median_session_length_30d);
$(element).find("#data_median_session_length_7d").text(data.median_session_length_7d);
$(element).find("#data_session_count_30d").text(data.session_count_30d);
$(element).find("#data_session_count_7d").text(data.session_count_7d);
$(element).find("#data_player_kills_30d").text(data.player_kill_count_30d);

View File

@ -285,8 +285,8 @@
<tr>
<td><i class="col-teal far fa-fw fa-clock"></i> Average Session Length
</td>
<td id="data_average_session_length_30d"></td>
<td id="data_average_session_length_7d"></td>
<td id="data_median_session_length_30d"></td>
<td id="data_median_session_length_7d"></td>
</tr>
<tr>
<td><i class="col-teal far fa-fw fa-calendar-check"></i> Sessions</td>