Skip to content

Add URL management to Code Insights dashboard page

Warren Gifford requested to merge code-insights/dashboard-page into main

Created by: vovakulikov

Closes part of https://github.com/sourcegraph/sourcegraph/issues/22225

This PR connects dashboard UI select component with URL routes state. Also now the dashboard page loads insights subset of insights according to dashboard configuration (insightIds field in the settings cascade).

What have been done

  • Connect UI logic and dashboard data
  • Connect UI logic with URL routes and sync active dashboard with insights route URL param.

How to Test

By default, you have to see at least 3 types of dashboards in a selection UI.

  • All insights
  • Your personal dashboard
  • Organizations dashboard

We also support custom dashboards. You should be able to add insights dashboard settings via user/org settings editor. Edit settings in a way

"insights.dashboards": {
   "testInsights": {
      "id": "<UUID>",
      "insightIds": [],
      "title": "<name of dashboards>"
   }
} 

Right after this change, you should see this new insight in a creation UI.

Merge request reports

Loading