Commit bab37ef9 authored by Martin Wortschack's avatar Martin Wortschack Committed by Robert Speicher

[VSA] Make lead time tile a link to lead time chart

parent 941c22d0
......@@ -16,6 +16,22 @@ module Gitlab
def end_event_identifier
:issue_closed
end
def links
helpers = Gitlab::Routing.url_helpers
dashboard_link =
if @stage.parent.is_a?(::Group)
helpers.group_analytics_ci_cd_analytics_path(@stage.parent, tab: 'lead-time')
else
helpers.charts_project_pipelines_path(@stage.parent, chart: 'lead-time')
end
[
{ "name" => _('Lead Time'), "url" => dashboard_link, "label" => s_('ValueStreamAnalytics|Dashboard') },
{ "name" => _('Lead Time'), "url" => helpers.help_page_path('user/analytics/index', anchor: 'definitions'), "docs_link" => true, "label" => s_('ValueStreamAnalytics|Go to docs') }
]
end
end
end
end
......
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