Commit a9382161 authored by mfluharty's avatar mfluharty

Adjustments for review

Add feature flag blurbs to docs
Move group navbar function next to the other group navbar functions
Replace utility classes with gitlab utility classes
parent 2d126384
......@@ -7,7 +7,14 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Repositories Analytics **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/215104) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.4.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/215104) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.4.
> - It's [deployed behind a feature flag](../../feature_flags.md), enabled by default.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-repositories-analytics). **(CORE ONLY)**
CAUTION: **Warning:**
This feature might not be available to you. Check the **version history** note above for details.
To get a CSV of the code coverage data for all of the projects in your group, go to your group's **Analytics > CI/CD** page, and click **Download historic test coverage data (.csv)**.
......@@ -20,6 +27,25 @@ For each day that a coverage report was generated by a job in a project's pipeli
If the project's code coverage was calculated more than once in a day, we will take the last value from that day.
## Enable or disable Repositories Analytics **(CORE ONLY)**
Repositories Analytics is under development but ready for production use.
It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can opt to disable it.
To enable it:
```ruby
Feature.enable(:group_coverage_reports)
```
To disable it:
```ruby
Feature.disable(:group_coverage_reports)
```
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
......
......@@ -115,6 +115,17 @@ module EE
)
end
def group_repository_analytics_navbar_link(group, current_user)
return unless ::Gitlab::Analytics.group_coverage_reports_enabled?
return unless group_sidebar_link?(:repository_analytics)
navbar_sub_item(
title: _('Repositories'),
path: 'groups/analytics/repository_analytics#show',
link: group_analytics_repository_analytics_path(group)
)
end
def insights_navbar_link(project, current_user)
return unless project_nav_tab?(:project_insights)
......@@ -135,17 +146,6 @@ module EE
link: project_analytics_code_reviews_path(project)
)
end
def group_repository_analytics_navbar_link(group, current_user)
return unless ::Gitlab::Analytics.group_coverage_reports_enabled?
return unless group_sidebar_link?(:repository_analytics)
navbar_sub_item(
title: _('Repositories'),
path: 'groups/analytics/repository_analytics#show',
link: group_analytics_repository_analytics_path(group)
)
end
end
end
end
......@@ -4,7 +4,7 @@
%h3
= _("Repositories Analytics")
.d-flex.justify-content-between.align-items-center
.gl-display-flex.gl-justify-content-between.gl-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, ref_path: "refs/heads/master", start_date: Date.today - 1.year, end_date: Date.today),
......
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