rails / mission_control-jobs

Dashboard and Active Job extensions to operate and troubleshoot background jobs
MIT License
611 stars 71 forks source link

Short navigation jobs count #176

Closed thibaudgg closed 3 weeks ago

thibaudgg commented 1 month ago

This patch defines the number_to_human format and units option to make the navigation section titles more compact and readable.

As an example, instead of "Finished Jobs (4.4 Thousand)" it will now display "Finished Jobs (4.4K)".

https://api.rubyonrails.org/classes/ActiveSupport/NumberHelper.html#method-i-number_to_human

Before:

Screenshot 2024-10-14 at 17 34 58

After:

Screenshot 2024-10-14 at 17 35 17
thibaudgg commented 1 month ago

Please let me know if you'd like me to add some tests around this patch. I took a quick look, but wasn't sure where it would be appropriate to add them or if it's worth it.