Update dashboards listing to retrieve dashboards from backend
What does this MR do and why?
This MR updates the dashboards listing to retrieve dashboards from the GraphQL endpoint. The GraphQL endpoint uses Snowplow rather than Jitsu, so we also have to make sure Snowplow is enabled using the product_analytics_snowplow_support
feature flag.
Specifically the changes made are:
- Adds a new GraphQL query to get the dashboards
- Updates listing to retrieve from GraphQL when Snowplow is enabled
- Updated dashboards YAMLs and dashboards JSONs to match each other (slug instead of id, audience instead of dashboard_audience etc)
- Updated listing to hide buttons when using Snowplow as visualization designer does not work
- Updated specs to check the buttons are hidden
- Updated specs to test with and without Snowplow enabled
- Added translations for the "By GitLab" label
This MR is part 1/2. The second MR Update individual dashboards to retrieve dashbo... (!121129 - merged) updates the individual dashboards to use the GraphQL endpoint.
Known issues
Screenshots or screen recordings
Setting up with Jitsu
Screen_Recording_2023-05-05_at_15.41.48
Setting up with Snowplow
Screen_Recording_2023-05-12_at_12.59.05
How to set up and validate locally
Note: This feature has a lot of setup steps. If you need help please ask me, or I can step through these during a call with you.
- Follow these instructions to set up Product Analytics in your GDK.
- Set up three projects within the same group:
- One is for Jitsu set up
- One is for Snowplow set up
- One is to act as a custom dashboards project like in !112481 (merged)
- This requires this project to have a
main
branch and have that set to be the default branch for the project.
- This requires this project to have a
- Go through the set-up process described in the instructions for your Jitsu project.
- View the dashboard list at Project → Analytics → Dashboards.
- Verify that the
new dashboard
andvisualization editor
buttons are rendered. - Verify the listing shows the dashboards.
- Enable the Snowplow flag by running the command:
echo "Feature.enable(:product_analytics_snowplow_support)" | rails c
. - Change to your Snowplow project and go through the set-up process again for Snowplow.
- Verify that the
new dashboard
andvisualization editor
buttons are not rendered. - Verify the listing shows the 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #382551 (closed)