Create a sibling page to the Insights page that can be embedded
Create a sibling page to the Insights page that can be embedded.
- An example of where this page could live is here: https://gitlab.com/gitlab-org/gitlab/insights/embedded
- This page needs to be publicly visible
- This page should just be used to display a chart, i.e. leave empty for this ticket (no navigation or sidebar)
- This page should set headers to allow for it to be embedded: It seems to me
X-Frame-Options: SAMEORIGIN
would be enough: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options - Note that limitation is for same-origin, only.
- Put page behind feature flag
- We don’t need to “generate” a URL, it will just be available if you know the right page and chart index
- This should not handle interactions with the chart that may render a new set of data!
- Should not be available for private projects/groups
- Inherit, or create, a controller that does not load the
current_user
. - Make sure to pass
nil
as the user in the insights finder, so it'll only query public items.
- Inherit, or create, a controller that does not load the
Edited by Michael Lunøe