Commit 7c812336 authored by mfluharty's avatar mfluharty

Add navbar link, page, and button

Add route for group repositories analytics
Add page with download button
Add link to page in sidebar analytics section
parent 3d10455e
# frozen_string_literal: true
class Groups::RepositoriesAnalyticsController < Groups::ApplicationController
end
...@@ -18,6 +18,7 @@ module EE ...@@ -18,6 +18,7 @@ module EE
override :group_analytics_navbar_links override :group_analytics_navbar_links
def group_analytics_navbar_links(group, current_user) def group_analytics_navbar_links(group, current_user)
super + [ super + [
repositories_analytics_navbar_link(group, current_user),
contribution_analytics_navbar_link(group, current_user), contribution_analytics_navbar_link(group, current_user),
group_insights_navbar_link(group, current_user), group_insights_navbar_link(group, current_user),
issues_analytics_navbar_link(group, current_user), issues_analytics_navbar_link(group, current_user),
...@@ -134,6 +135,16 @@ module EE ...@@ -134,6 +135,16 @@ module EE
link: project_analytics_code_reviews_path(project) link: project_analytics_code_reviews_path(project)
) )
end end
def repositories_analytics_navbar_link(group, current_user)
return unless group_sidebar_link?(:repositories_analytics)
navbar_sub_item(
title: _('Repositories'),
path: 'groups/repositories_analytics#show',
link: group_repositories_analytics_path(group)
)
end
end end
end end
end end
...@@ -150,6 +150,10 @@ module EE ...@@ -150,6 +150,10 @@ module EE
links << :iterations links << :iterations
end end
if true
links << :repositories_analytics
end
links links
end end
end end
......
- page_title _("Repositories Analytics")
.mb-3.border-bottom
%h3
= _("Repositories Analytics")
.d-flex.justify-content-between.align-items-center
%h4.sub-header
= _("Test Code Coverage")
= link_to _("Download historic test coverage data (.csv)"), group_analytics_coverage_reports_path(@group, format: :csv), class: 'btn btn-sm'
...@@ -21,6 +21,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do ...@@ -21,6 +21,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
get '/analytics', to: redirect('groups/%{group_id}/-/contribution_analytics') get '/analytics', to: redirect('groups/%{group_id}/-/contribution_analytics')
resource :contribution_analytics, only: [:show] resource :contribution_analytics, only: [:show]
resource :repositories_analytics, only: [:show]
namespace :analytics do namespace :analytics do
resource :productivity_analytics, only: :show, constraints: -> (req) { Gitlab::Analytics.productivity_analytics_enabled? } resource :productivity_analytics, only: :show, constraints: -> (req) { Gitlab::Analytics.productivity_analytics_enabled? }
......
...@@ -8994,6 +8994,9 @@ msgstr "" ...@@ -8994,6 +8994,9 @@ msgstr ""
msgid "Download export" msgid "Download export"
msgstr "" msgstr ""
msgid "Download historic test coverage data (.csv)"
msgstr ""
msgid "Download image" msgid "Download image"
msgstr "" msgstr ""
...@@ -21075,6 +21078,9 @@ msgstr "" ...@@ -21075,6 +21078,9 @@ msgstr ""
msgid "Repositories" msgid "Repositories"
msgstr "" msgstr ""
msgid "Repositories Analytics"
msgstr ""
msgid "Repository" msgid "Repository"
msgstr "" msgstr ""
...@@ -24574,6 +24580,9 @@ msgstr "" ...@@ -24574,6 +24580,9 @@ msgstr ""
msgid "Test Cases" msgid "Test Cases"
msgstr "" msgstr ""
msgid "Test Code Coverage"
msgstr ""
msgid "Test cases are not available for this project" msgid "Test cases are not available for this project"
msgstr "" msgstr ""
......
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