Add CI minutes usage charts to group usage quotas

What does this MR do and why?

This makes the CI minutes usage charts available to groups

#341509 (closed)

Screenshots or screen recordings

Screen_Shot_2022-02-09_at_12.17.52

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Get the ID from the group you are owner or maintainer of in the GDK, this is available in the Group home page in the upper left corner
  2. Open the rails console bundle exec rails c
  3. Run the following commands to add some minutes to the project
group = Group.find(<group_number>)
namespace_usage = Ci::Minutes::NamespaceMonthlyUsage.new(namespace_id: group.id, date: Date.new(2021, 12, 01), amount_used: 110, shared_runners_duration: 100)
namespace_usage.save

Repeat the commands above and change the months to keep adding more minutes and see more of the chart

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading