Add visualization selector to analytics dashboard editor
What does this MR do and why?
Issue - #385705 (closed)
This MR does the following:
- Adds in editing mode a sidebar from which available visualizations can be selected.
- Clicking on one of the available visualizations creates a new dashboard with it.
- Adds a button that links to the visualization designer.
- Note this does not have any save functionality right now!
This MR does not do the following:
- Resolve the issue where exiting edit mode won't undo changes. [Bug] Handle unsaved changes in analytics dashb... (#410349 - closed)
- Add the ability to remove panels once added. Add ability to remove panels in analytics dashb... (#410350 - closed)
Important to note that analytics dashboards is an experimental feature that is hidden behind a default off feature flag.
Screenshots or screen recordings
Before | After |
---|---|
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 setup Product Analytics in GDK and configure a project.
- Configure a custom dashboard project like in !112481 (merged).
- This needs a repository with a
main
branch in the same group as your test project.
- This needs a repository with a
- View the dashboard list at Project -> Analytics -> Dashboards.
- Create a new dashboard by clicking on the
New dashboard
button. - Verify that you can add any of the available visualisations to the dashboard.
- Verify that this can be saved.
- Verify that clicking on the
Create new visualization
opens the designer.
How to add a custom visualization for testing.
Click to expand
Commit the following contents to .gitlab/dashboards/product_analytics/visualizations/new_custom_viz.yml
to your main
branch.
version: 1
type: ColumnChart
data:
type: cube_analytics
query:
measures:
- TrackedEvents.pageViewsCount
dimensions:
- TrackedEvents.parsedUaOsFamily
limit: 100
timezone: UTC
filters: []
timeDimensions: []
options:
xAxis:
name: Dimension
type: category
yAxis:
name: Counts
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.
Edited by Jiaan Louw