Skip to content

Add Code Insights dashboards get operation

Administrator requested to merge code-insights/dashboards-management into main

Created by: vovakulikov

Background

Closes https://github.com/sourcegraph/sourcegraph/issues/22217 Currently, insights pages have operations over only one type of entity - insights. Since we are starting to work on dashboard UI for Code Insights we need to implement and monitor another type of entity - Code Insights Dashboards.

// user or organization settings
"insightsDasbhoard.<id of dashboard | title of dashboard>" : {
  // ID for further backend migration
  id: UUID,
  // Title must be unique across all other dashboards since we use 
  // title as part of unique dashboard ID
  "title": "Dashboard title. Example: extensibility team insights",
  
  // Insights IDs from user personal or org-wide settings
  "insightsIds": []
}

What have been done

This PR adds

  • Refactoring insights settings operation (reduced API surface of jsonc operations and move everything in one module)
  • Implementation of getting dashboard insights list with the meta info about each dashboard (org, title, insights ids)
  • Updated schema.json file with insights.dashboard pattern

Merge request reports

Loading