Skip to content

Show one digit after dot in commit_per_day value in charts page.

What does this MR do?

This MR adds functionality to show fractions of commit_per_day on repository/charts page (ie. https://gitlab.com/msdundar/gitlab-ce/graphs/master/charts)- as suggested by @dzaporozhets on #26512 (closed).

Examples:

actual value before after
0.21 0 0.2
0.02 0 0.0
5 5 5.0
5.4132 5 5.4

Why was this MR needed?

  • An average value doesn't need to be an integer, it can also be a float too.
  • Showing a value such as 0.5 commits_per_day is more meaningful than showing 0 commits per day for a repository with commits.
  • This change was requested in #26512 (closed).

Screenshots (if relevant)

Before:

Screenshot_from_2018-07-27_23-07-05

After:

Screenshot_from_2018-07-27_23-06-34

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#26512 (closed).

Edited by M. Serhat Dundar

Merge request reports