summaryrefslogtreecommitdiff
path: root/views/user.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-02-21 16:21:59 +0100
committerTor Andersson <tor@ccxvii.net>2025-02-21 21:13:06 +0100
commit8e873b80c8fc3a92f994648397729645109f5711 (patch)
treec71d5e1f12a3a8189096f3eaab44066d36c0830e /views/user.pug
parent9cd0f1f2599bb072f992e3b825d83726f81cfc63 (diff)
downloadserver-8e873b80c8fc3a92f994648397729645109f5711.tar.gz
Track is_active in players table. Improve SQL triggers for time control.HEADmaster
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/user.pug')
-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}