summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-02-21 16:21:59 +0100
committerTor Andersson <tor@ccxvii.net>2025-02-23 12:56:27 +0100
commitc4138d200fc685ac7ed38c534dc03b188aab69c6 (patch)
tree9e9fbdb92a57036a619daed38581dc7a4d1a7350 /views
parent78b760f4099e230202b54c5ccbcf65cad1ed2b6d (diff)
downloadserver-c4138d200fc685ac7ed38c534dc03b188aab69c6.tar.gz
Track is_active in players table. Improve SQL triggers for time control.
Use triggers to update is_active and time control data and move time statistics. Show median and interquartile range move times on profile.
Diffstat (limited to 'views')
-rw-r--r--views/user.pug9
1 files changed, 7 insertions, 2 deletions
diff --git a/views/user.pug b/views/user.pug
index 4aecb0b..c3e8925 100644
--- a/views/user.pug
+++ b/views/user.pug
@@ -42,8 +42,13 @@ html
br
a(href="/contacts/add-enemy/"+who.name) Add to blacklist
- h3 Response time
- div Average response time: #{(who.move_time_avg * 24).toFixed(2)} hours
+ if (who.move_time_mean !== null)
+ h3 Response time
+ div Average response time: #{format_minutes(who.move_time_mean)}
+ if (who.move_time_q2 !== null)
+ div Median response time: #{format_minutes(who.move_time_q2)}
+ if (who.move_time_q1 !== null && who.move_time_q2 !== null)
+ div Middle half of response times: #{format_minutes(who.move_time_q1)} to #{format_minutes(who.move_time_q3)}
h3 Timeouts
div Total number of timeouts: #{who.timeout_total}