Commit beb4d259 authored by Dhiraj Bodicherla's avatar Dhiraj Bodicherla Committed by Robert Speicher

Add base url path for metrics dashboards

Base URL is needed for the metrics
dashboard for the Vue router to function.
This MR adds it on the BE and passes to FE
parent 1a651214
...@@ -68,6 +68,7 @@ module EnvironmentsHelper ...@@ -68,6 +68,7 @@ module EnvironmentsHelper
return {} unless environment return {} unless environment
{ {
'metrics-dashboard-base-path' => environment_metrics_path(environment),
'current-environment-name' => environment.name, 'current-environment-name' => environment.name,
'has-metrics' => "#{environment.has_metrics?}", 'has-metrics' => "#{environment.has_metrics?}",
'prometheus-status' => "#{environment.prometheus_status}", 'prometheus-status' => "#{environment.prometheus_status}",
......
...@@ -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