Rearrange VSA data attributes
What does this MR do and why?
This MR rearranges the data-
parameter handling in the Value Stream Analytics feature and prepares it for the upcoming frontend change where the project-level and group-level views are "merged".
The Gitlab::Analytics::CycleAnalytics::RequestParams
class parses the incoming filter parameters, passes them down to the service layer, and generates a hash for the data-
attributes which are used by the VueJS app.
This MR splits the class to extract the EE-specific code to the EE
namespace and adds extra license checks. This was lacking from the previous implementation. Additional changes:
-
lib/gitlab/analytics/cycle_analytics/request_params.rb
: Some methods have been moved to EE. - Some test cases have been moved to a shared example so we can share them on project and group levels:
ee/spec/lib/gitlab/analytics/cycle_analytics/request_params_spec.rb
->spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb
- Add the
namespace
config (full path, avatar, etc) which is container agnostic (handles groups or projects). The next version of the VSA frontend will use this config. - Remove the
CycleAnalyticsHelper
and move the code to theRequestParams
class. (API and image path generation) - Remove the
project
andgroup
attributes fromRequestParams
. The class will work with thenamespace
attribute from now on (Group
orNamespaces::ProjectNamespace
)` - Adds the
enable_tasks_by_type_chart
boolean flag. This will control the tasks by chart rendering (show or hide). We'll only show it when a group is given for now.
How to set up and validate locally
The MR introduces non-user-facing changes. You can validate that the existing feature works by navigating to Analytics > Value Stream
on the project and group levels.
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 #382492 (closed)