Opened 5 years ago
Last modified 3 years ago
#4238 new enhancement
Allow ability to "colourize" 'How long ago' column
| Reported by: | fermulator | Owned by: | rjollos |
|---|---|---|---|
| Priority: | normal | Component: | UserStatsMacro |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
It would be useful to be able to specify thresholds for different coloured output on the "How Long Ago" column of the UserStatsMacro.
Currently, if we have a fair number of users, it's not clear instantly who's good and who's bad.
Example:
| User | Last Login | How long ago |
| user | 2008/12/04 00:36:38 | 5 day(s) |
| user | 2008/12/07 13:07:03 | 2 day(s) |
| user | 2008/11/22 14:32:52 | 17 day(s) |
| user | 2008/12/09 16:48:47 | <24h |
| user | 2008/11/30 18:49:48 | 8 day(s) |
| user | 2008/12/08 23:14:37 | <24h |
| user | 1969/12/31 19:00:00 | 14222 day(s) |
| user | 2008/12/08 21:07:58 | <24h |
| user | 2008/12/02 22:02:40 | 6 day(s) |
| user | 2008/12/06 16:38:27 | 3 day(s) |
| user | 1969/12/31 19:00:00 | 14222 day(s) |
| user | 2008/12/06 19:30:49 | 2 day(s) |
| user | 2008/12/09 12:12:28 | <24h |
| user | 2008/12/08 03:25:15 | 1 day(s) |
| user | 2008/02/07 12:33:36 | 306 day(s) |
| user | 2008/12/07 13:24:13 | 2 day(s) |
However, if we could provide optional threshold values to the "How Long Ago" in days, it would help make it much clearer who's active and who's not.
Example Macro Call:
[[UserStats(threshold(green,7), threshold(yellow,14), threshold(red,999999), etc.)]]
The above example would provide some sort of colour feedback to the table. If the user logged in within the last 7 days, they would be GREEN, in between 7 and 14, YELLOW, more than 14 days RED)
(Obviously my idea of the call isn't ideal, but hopefully you get the point.)
Attachments (0)
Change History (3)
comment:1 Changed 4 years ago by rjollos
- Summary changed from Allow ability to ''colourize'' "How long ago" output to Allow ability to "colourize" 'How long ago' column
comment:2 Changed 3 years ago by rjollos
- Owner changed from pedro to rjollos


I don't think colours are going to be easy as the macro currently relies on wiki formatting to generate the table. However, it should be possible to make it more readable, see #5640...
Possible alternatives: