Add shared runners chart for groups/namespaces
What does this MR do and why?
This adds an area chart that specifies the CI minutes used for shared runners in a given group
Screenshots or screen recordings
How to set up and validate locally
Note This chart is only visible to groups you have permission to see the Analytics -> CI/CD menu item on the sidebar
- Get the group ID for the group you want to see the analytics for, this is available on
Group -> Settings
- Open the rails console
bundle exec rails console
and issue the following commands:
group = Group.find(<group_id>)
namespace_usage = Ci::Minutes::NamespaceMonthlyUsage.new(namespace_id: group, date: Date.new(2021, 9, 01), amount_used: 85)
namespace_usage.save
Change the amount_used
and the date and repeat the last two steps to include as many months as you want on the chart, warning using the same month and year as the currently running month will throw an error on the console.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jose Ivan Vargas