Skip to content

DRAFT: PoC exec dashboard widget

Ezekiel Kigbo requested to merge ek-poc-exec-dashboard-widget into master

What does this MR do and why?

  • Make dashboard component a visualization
  • Render dashboard for the specified namespace / date range
  • Use repo pointer to retrieve schema
  • Match schema to proposal
  • Render dashboard from yaml schema

Screenshots or screen recordings

720-widget-yaml-project-pointer

How to set up and validate locally

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

  1. Enable the group_analytics_dashboards_page feature flag
  2. Create a group
  3. Seed cycle analytics data
  4. Create 2 projects in the group, name one config (or something similar)
  5. In the second project Create an environment from the UI named production
  6. Seed DORA daily metrics in the environment using the new environment
# Open the rails console
rails c
# Within the rails console
$ e = Environment.order(:id)[-1]
$ 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)) }
  1. In the config project, add a yaml dashboards config file at the root of the repo .gitlab/dashboards/exec_dashboard.yaml
---
title: Value Streams Dashboard (Beta)
# Separate definitions for each widget might make this easier to pair with the widget designer
widgets:
- id: 1
  visualization: dora_comparison_table
  title: DORA insights group - metrics comparison
  gridAttributes:
    yPos: 0
    xPos: 0
    width: 12
    minHeight: 5
  data:
    namespace:
      - {NAME_OF_YOUR_GROUP} # example: groups/name-of-your-group
- id: 2
  visualization: dora_comparison_table
  title: Insights config project
  gridAttributes:
    yPos: 8
    xPos: 0
    width: 6
    minHeight: 5
  data:
    namespace:
      - {NAME_OF_THE_PROJECT_WITH_SEEDED_DATA} # example: name-of-your-group/name-of-project
  1. In the group settings, add an analytics dashboard pointer to the config project
  2. Navigate to the group analytics dashboard http://gdk:port/groups/<group-path>/-/analytics/dashboards

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 Ezekiel Kigbo

Merge request reports