Support dashboard params for metrics dashboard endpoint
What does this MR do?
Part of of series of MRs to cleanup & add support for embedding specific metrics in markdown!
This MR
This particular MR adds support for several params on the EnvironmentsController#metrics_dashboard
endpoint - group
, title
, and y_label
. Together with the dashboard
param, these params provide enough information to uniquely identify a chart on the metrics dashboard.
Metrics are stored in multiple locations - both the DB and the project's files. This MR adds classes which handle each of these cases uniquely.
Note: This MR has no user-facing changes, so it will not include a changelog.
Context
Prior context: https://gitlab.com/gitlab-org/gitlab-ce/issues/30423 introduced a default embed.
The below MRs are all part of this work:
-
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31006 - Move dashboard services to /services
subdirectory & renameDynamicDashboardService
toDefaultEmbedService
-
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31157 - Fix embeds caching bug -
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31063 - Introduce support for fetching a specific embed -
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31304 - Add support for dashboard params in GFM pipeline
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. -
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