Match both metrics and metrics dashboard embeds in entirety
What does this MR do?
Metrics embeds in GFM based on urls of format metrics_dashboard_project_environment_url
and metrics_project_environment_url
are meant to be supported. Currently, Gitlab::Metrics::Dashboard::Url#metrics_regex
only half-way supports the metrics_dashboard
route. It matches the route, but not up through any of the query params.
This was highlighted by #195739 (closed), which introduced an automatically generated embed which relies on the metrics_dashboard
route with query params (even though I meant it to work with the metrics
version).
But updating the regex rather than the utilized route, either can be used interchangeably as intended, while any automatically generated embeds remain valid.
Screenshots
Using /metrics_dashboard
|
Using /metrics
|
---|---|
![]() |
![]() |
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability 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 -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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