Add filters option to dashboard yml config
What does this MR do and why?
Currently dashboard filters are enabled by default and disabled in code for certain dashboards. This has obvious limitations which we want to address.
This MR makes dashboard filters configurable through yaml config:
filters:
excludeAnonymousUsers
enabled: true
dateRange:
enabled: true
# 'options' and 'default' can be added later
As discussed, filters will be disabled by default, in order not to break Optimise dashboards ( given PA is not live ). It should also be easier to opt-in filters that user might need instead of explicitly having to disable a bunch. See also Multiversion compatibility below.
Changes:
- Support
filtersattribute in yaml config - Render dashboard filters based on config rather than being hardcoded. If not configured, filters are off by default.
- Enable filters for builtin PA dashboards
Note on Multiversion compatibility:
Since Product Analytics is not a live feature, we don't need to guarantee multiversion compatibility:
- Old frontend , new backend : Filters are hardcoded, so no change there
- New frontend , old backend: Filters are disabled by default when filters config is not specified , so Value Stream (live feature) will work correctly. Product Analytics dashboard will break, but this feature is not live and under FF and we are ok with breaking it.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
|
|
How to set up and validate locally
- You need a GitLab Ultimate license.
- Follow the guide to enable product analytics on your GDK.
- Navigate to Project > Analytics > Analytics dashboards.
- Confirm that Value Stream Dashboard has no filters enabled
- Config that Audience and Behaviour dashboard has filters enabled
- Clone one of the builtin dashboards, then edit the associated config file and play around with the filters. Confirm that the UI updates accordingly.





