Fetch cycle analytics stages groups and events separately
What does this MR do?
For #13076 (closed) we need to fetch cycle analytics data from the /-/analytics
dedicated endpoints introduced in !18208 (merged). This MR introduces a new endpoints for retrieving:
- Custom stage events
- Stages including custom stages
The summary and stats data will still be fetched from the existing /groups/...cycle-analytics
endpoint. The median values for each stage will be also be fetched from the existing endpoint, until a new dedicated endpoint for median data and stage event data is ready. This means that custom stages will have no median / stage event data yet.
This MR also splits the existing vuex actions to better reflect the queries being made
We are also removing the isUserAllowed
property from the stage data since we are currently not using it.
Before
Vuex Actions after selecting a group
+-----------+
| Base.vue |
+-----------+
| +---------------------------------+
--> REQUEST_CYCLE_ANALYTICS_DATA -> | Returns (default) stages and |
| | summary data |
| +---------------------------------+
|
| +---------------------------------+
--> SET_STAGE_DATA_ENDPOINT ------> | Set the current stage |
| +---------------------------------+
|
| +---------------------------------+
--> REQUEST_STAGE_DATA -----------> | Events for the current stage |
+---------------------------------+
After
Vuex Actions after selecting a group
+-----------+
| Base.vue |
+-----------+
| +---------------------------------+
--> REQUEST_CYCLE_ANALYTICS_DATA -> | Kicks off the data requests |
| +---------------------------------+
|
| +---------------------------------+
--> REQUEST_SUMMARY_DATA -----------> | Returns (default) stages and |
| | summary data |
| +---------------------------------+
| +---------------------------------+
--> REQUEST_GROUP_STAGES_AND_EVENTS ->| Returns default + custom stages |
| | and custom stage event types |
| +---------------------------------+
|
| +---------------------------------+
--> SET_STAGE_DATA_ENDPOINT --------> | Set the current stage |
| +---------------------------------+
|
| +---------------------------------+
--> REQUEST_GROUP_LABELS -----------> | Returns all group level labels |
| +---------------------------------+
|
| +---------------------------------+
--> REQUEST_STAGE_DATA -------------> | Events for the current stage |
+---------------------------------+
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team