Commit Graph

20 Commits

Author SHA1 Message Date
Joffrey JAFFEUX b6337b72f1
FEATURE: adds last day to about page stats (#12663)
* FEATURE: adds last day to about page stats

* make it clear it's last 24 hours

* applies same copy fix to days
2021-04-12 12:50:33 +10:00
Régis Hanol c847f5e8a1
DEV: small refactor of the category_moderators method (#12550)
* DEV: small refactor of the category_moderators method

Used `index_by(&:id)` instead of `map { |u| [u.id, u] }.to_h` thanks to @cvx's recommendation.

Also renamed the `moderators` variable to not clash with method of the same name.
2021-03-30 23:12:53 +02:00
Régis Hanol e8cad4bbf3
PERF: improve category moderators query (#12538)
In the about page, we list a certain number of category moderators.

This rewrites the SQL query used to retrieve the most recent category moderators in order
to perform better with a large number of users/categories/category moderators.

TIL: you can ORDER BY inside an ARRAY_AGG in postgres
TIL: you can slide ARRAYS in postgres
2021-03-28 10:25:30 +02:00
Osama Sayegh e27f332318
PERF: speed up about page render time and limit category mods (#8112)
* PERF: speed up about page render time and limit category mods

* Remove return

* Remove widgets

* Convert admins and mods lists

* Rename component

* Apply Joffrey's patch

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>

* Make limit 100
2019-10-03 21:48:56 +03:00
Osama Sayegh 13e74151a9
FEATURE: list category moderators on the about page (#7916)
https://meta.discourse.org/t/category-group-review-moderation/116478?u=osama
2019-07-31 16:46:58 +03:00
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Arpit Jalan c4422fdc13 UX: sort admins and moderators by last seen date on /about page
UX: only show active admins and moderators on /about page
2019-01-15 17:26:11 +05:30
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Guo Xiang Tan 4d4a1a1552 Add scope for human users. 2017-03-11 14:25:09 +08:00
Guo Xiang Tan eb6ef0311e Hide special users from about pages. 2017-03-10 15:33:31 +08:00
Guo Xiang Tan 20359788dc
Rename `SiteSetting#use_https` to `force_https`. 2016-06-29 15:02:43 +08:00
Guo Xiang Tan b0ea6764e0 PERF: Cache About#stats. 2015-07-20 22:45:05 +08:00
Régis Hanol 81290d7f18 UX: sort staff members by username 2015-06-15 18:53:53 +02:00
Robin Ward 2104c08fb7 FIX: About user count was off by 1 2015-02-17 15:32:06 -05:00
Neil Lalonde b56999e984 show last 30 days on about page 2015-02-02 12:27:49 -05:00
Neil Lalonde 750b27f973 FEATURE: show number of active users in the last 7 days on about page 2015-01-30 17:23:52 -05:00
Sam 0111cb4cc2 FEATURE: serialize the fact we are https in about 2014-11-24 17:54:17 +11:00
Robin Ward c316894167 TWEAK: Don't include moderators on "About" if they are admins. 2014-08-20 12:43:02 -04:00
Robin Ward c8767dc505 UX: Tweak about page 2014-08-11 18:15:49 -04:00
Robin Ward c103398e9a First stab at About page 2014-08-11 16:59:15 -04:00