Add context menu links to metrics dashboard panel
What does this MR do?
Implements: #215497 (closed)
Renders links in the panel context menu when links are defined in the dashboard with the format:
links:
- title: GitLab ### Optional, we show the url if no title is provided.
url: https://gitlab.com/
Screenshots
Panel Example |
---|
See the full yml for this panel
---
dashboard: Links
panel_groups:
- group: Group Name
panels:
- title: Memory Usage (Total)
type: area-chart
y_label: Total Memory Used (GB)
links:
- url: https://gitlab.com/
title: GitLab
- url: /root/autodevops-deploy/-/environments/29/metrics?dashboard=.gitlab%2Fdashboards%2Fanomaly_subqueries.yml
title: Anomalies Dashboard
metrics:
- id: system_metrics_kubernetes_container_memory_total
query_range: avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-(.*)",namespace="{{kube_namespace}}"})
by (job)) without (job) /1024/1024/1024
label: Total (GB)
unit: GB
metric_id: 15
Variants
What if there are more or fewer items?
few items | more items | system dashboard cannot be edited |
---|---|---|
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
Edited by 🤖 GitLab Bot 🤖