debian-mirror-gitlab/app/views/projects/graphs/charts.html.haml

75 lines
2.4 KiB
Text
Raw Normal View History

2020-04-22 19:07:51 +05:30
- page_title _("Repository Analytics")
2022-11-25 23:54:43 +05:30
- add_page_specific_style 'page_bundles/graph_charts'
2015-04-26 12:48:37 +05:30
2020-05-24 23:13:21 +05:30
.mb-3
%h3
= _("Repository Analytics")
2019-12-04 20:38:33 +05:30
.repo-charts
2017-08-17 22:00:37 +05:30
%h4.sub-header
2018-03-17 18:26:18 +05:30
= _("Programming languages used in this repository")
2015-11-26 14:37:03 +05:30
2020-03-13 15:44:24 +05:30
%p
= _("Measured in bytes of code. Excludes generated and vendored code.")
#js-languages-chart{ data: { chart_data: @languages.to_json.html_safe } }
2017-08-17 22:00:37 +05:30
2020-05-24 23:13:21 +05:30
- if defined?(@daily_coverage_options)
.repo-charts.my-5
2022-08-27 11:52:29 +05:30
#js-code-coverage-chart{ data: project_coverage_chart_data_attributes(@daily_coverage_options, @ref) }
2020-05-24 23:13:21 +05:30
2019-12-04 20:38:33 +05:30
.repo-charts
2017-08-17 22:00:37 +05:30
.sub-header-block.border-top
.row.tree-ref-header
.col-md-6
%h4
2018-03-17 18:26:18 +05:30
- start_time = capture do
#{@commits_graph.start_date.strftime('%b %d')}
- end_time = capture do
#{@commits_graph.end_date.strftime('%b %d')}
2018-06-27 16:04:02 +05:30
= (_("Commit statistics for %{ref} %{start_time} - %{end_time}") % { ref: "<strong>#{h @ref}</strong>", start_time: start_time, end_time: end_time }).html_safe
2020-04-08 14:13:33 +05:30
= _("Excluding merge commits. Limited to %{limit} commits.") % {limit: number_with_delimiter(@commits_limit, delimiter: ',')}
2017-08-17 22:00:37 +05:30
.col-md-6
.tree-ref-container
.tree-ref-holder
2022-07-16 23:28:13 +05:30
= render 'shared/ref_switcher', destination: 'graphs_commits', path: @path
2017-08-17 22:00:37 +05:30
%ul.breadcrumb.repo-breadcrumb
= commits_breadcrumbs
2015-04-26 12:48:37 +05:30
2016-06-22 15:30:34 +05:30
.row
.col-md-6
2017-08-17 22:00:37 +05:30
%ul.commit-stats
2016-06-22 15:30:34 +05:30
%li
2018-03-17 18:26:18 +05:30
- total = capture do
#{@commits_graph.commits.size}
= (_("Total: %{total}") % { total: "<strong>#{total} commits</strong>" }).html_safe
2016-06-22 15:30:34 +05:30
%li
2018-03-17 18:26:18 +05:30
- average = capture do
#{@commits_graph.commit_per_day}
= (_("Average per day: %{average}") % { average: "<strong>#{average} commits</strong>" }).html_safe
2016-06-22 15:30:34 +05:30
%li
2018-03-17 18:26:18 +05:30
- authors = capture do
#{@commits_graph.authors}
= (_("Authors: %{authors}") % { authors: "<strong>#{authors}</strong>" }).html_safe
2016-06-22 15:30:34 +05:30
.col-md-6
2019-07-07 11:18:12 +05:30
%p.slead
= _("Commits per day of month")
2016-06-22 15:30:34 +05:30
%div
2020-03-13 15:44:24 +05:30
#js-month-chart{ data: { chart_data: @commits_per_month.to_json.html_safe } }
2016-06-22 15:30:34 +05:30
.row
.col-md-6
.col-md-6
2019-07-07 11:18:12 +05:30
%p.slead
= _("Commits per weekday")
2016-06-22 15:30:34 +05:30
%div
2020-03-13 15:44:24 +05:30
#js-weekday-chart{ data: { chart_data: @commits_per_week_days.to_json.html_safe } }
2017-08-17 22:00:37 +05:30
.row
.col-md-6
.col-md-6
2019-07-07 11:18:12 +05:30
%p.slead
= _("Commits per day hour (UTC)")
2017-08-17 22:00:37 +05:30
%div
2020-03-13 15:44:24 +05:30
#js-hour-chart{ data: { chart_data: @commits_per_time.to_json.html_safe } }