Add functionality to look-up and display chart on embeddable Insights page
Add functionality to look-up and display chart on embeddable Insights page
- This page should display one chart based on index
- Get chart from the insight.json page definition (examples here:
/groups/gitlab-org/-/insights.json
,/gitlab-org/gitlab/insights.json
, and fixture here: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/fixtures/insights/default.yml) - Needs to grab the group/project
and the category/path="insights"from the URL. Update: Just do the same as the insight page is already doing to create the query and then read the chart index from the URL param. - An example of a request to this page could look like this: https://gitlab.com/gitlab-org/gitlab/insights/embedded?index=0
- The index is used to look up the chart in the insights.json above
- If there is no index param, return an error message
- If the chart is not found it should return an error message
- Get chart from the insight.json page definition (examples here:
Edited by Michael Lunøe