Commit d99fd44b authored by Robert Speicher's avatar Robert Speicher

Merge branch 'dbodicherla-add-base-metrics-dashboard-url' into 'master'

Add base url path for metrics dashboards

See merge request gitlab-org/gitlab!33553
parents c7e781d3 beb4d259
...@@ -68,10 +68,11 @@ module EnvironmentsHelper ...@@ -68,10 +68,11 @@ module EnvironmentsHelper
return {} unless environment return {} unless environment
{ {
'current-environment-name' => environment.name, 'metrics-dashboard-base-path' => environment_metrics_path(environment),
'has-metrics' => "#{environment.has_metrics?}", 'current-environment-name' => environment.name,
'prometheus-status' => "#{environment.prometheus_status}", 'has-metrics' => "#{environment.has_metrics?}",
'environment-state' => "#{environment.state}" 'prometheus-status' => "#{environment.prometheus_status}",
'environment-state' => "#{environment.state}"
} }
end end
......
...@@ -20,6 +20,7 @@ describe EnvironmentsHelper do ...@@ -20,6 +20,7 @@ describe EnvironmentsHelper do
expect(metrics_data).to include( expect(metrics_data).to include(
'settings-path' => edit_project_service_path(project, 'prometheus'), 'settings-path' => edit_project_service_path(project, 'prometheus'),
'clusters-path' => project_clusters_path(project), 'clusters-path' => project_clusters_path(project),
'metrics-dashboard-base-path' => environment_metrics_path(environment),
'current-environment-name' => environment.name, 'current-environment-name' => environment.name,
'documentation-path' => help_page_path('administration/monitoring/prometheus/index.md'), 'documentation-path' => help_page_path('administration/monitoring/prometheus/index.md'),
'empty-getting-started-svg-path' => match_asset_path('/assets/illustrations/monitoring/getting_started.svg'), 'empty-getting-started-svg-path' => match_asset_path('/assets/illustrations/monitoring/getting_started.svg'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment