Update ci minutes charts

What does this MR do and why?

Relates to #370020 (closed)

In order to enable the pipelines tab vue app (#360785 (closed)) we need to get the app back to feature parity with the current haml view. This is the second of a series of MRs that aim to do that

MR Description
!95253 (merged) Updates Usage Overview
!95256 (merged) (👈 you're here) Updates Usage Graphs
!95259 (merged) Updates Project List

Screenshots or screen recordings

Obs: this takes care only about the charts, the project list difference will be tackled in !95259 (merged)

FF on FF off
95256_charts_ff_on 95256_charts_ff_off

How to set up and validate locally

  1. Make sure to enable: ::Gitlab::CurrentSettings.update(check_namespace_plan: true)
  2. Make sure you're simulating SaaS
  3. Enable the FF: Feature.enable(:usage_quotas_pipelines_vue)
  4. Go to any group's usage quotas page
  5. Check the usage overview
  6. Turn off FF: Feature.disable(:usage_quotas_pipelines_vue)
  7. Compare the graphs
  8. To add some data, you can follow the instructions below, or this other way
    1. Project:
      1. Create data: Ci::Minutes::ProjectMonthlyUsage.new(project_id: 22, date: Date.new(2022, 8, 01), amount_used: 70).save
      2. Update data: Ci::Minutes::ProjectMonthlyUsage.where(project_id: 35, date: Date.new(2022, 8, 01)).update(amount_used: 70)
    2. Namespace:
      1. Create data: Ci::Minutes::NamespaceMonthlyUsage.new(namespace_id: 77, date: Date.new(2022, 8, 01), amount_used: 220).save
      2. Update data: Ci::Minutes::NamespaceMonthlyUsage.where(namespace_id: 77, date: Date.new(2022, 8, 01)).update(amount_used: 220)

MR acceptance checklist

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

Edited by Sheldon Led

Merge request reports

Loading