Skip to content

Exec Dashboards PoC: Separate comparative table MVC by groups/projects

What does this MR do and why?

Adds support for a query parameter to the analytics dashboard to specify the projects/subgroups we should render as a dora comparison table

  • Refactors the dora comparison chart into a separate component
  • Adds a query parameter to specify the subgroups / projects to render
  • With no query only render the table for the group
  • With a query, render a table for the group and each project/subgroup specified

NOTE:

Screenshots or screen recordings

Without a query With projects specified in query
Screenshot_2022-12-06_at_2.39.11_pm Screenshot_2022-12-06_at_2.37.42_pm

How to set up and validate locally

Enable dashboard

  1. Enable the dashboards page
    Feature.enable(:group_analytics_dashboards_page)
  2. Ensure you're on the ultimate plan
  3. Visit any Group > Analytics > Dashboards

Seed data

  1. Create a project in the group
  2. Create an environment from the UI named production
  3. Open the rails console
    rails c
  4. Find the environment id
    // Within the rails console
    $ e = Environment.order(:id)[-1]
  5. Seed DORA daily metrics in the environment using the environment
    // Within the rails console
    $ 100.times { |i| Dora::DailyMetrics.create(environment_id: e.id, date: (i + 1).days.ago, deployment_frequency: rand(50), incidents_count: rand(5), lead_time_for_changes_in_seconds: rand(50000), time_to_restore_service_in_seconds: rand(100000)) }

Viewing the dashboard

Navigate to the the exec dashboard for the group and specify the project path in the `query parameter

// For example
// Group: flightjs
// Project: flightjs/flight
Navigate to http://gdk.test:3000/groups/flightjs/-/analytics/dashboards?query=flightjs/flight

MR acceptance checklist

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

Related to #378373 (closed)

Edited by Ezekiel Kigbo

Merge request reports